Changeset 92
- Timestamp:
- 07/19/06 14:02:31 (2 years ago)
- Files:
-
- branches/mk/cheesecake/cheesecake_index.py (modified) (1 diff)
- branches/mk/tests/unit/test_index_class.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/mk/cheesecake/cheesecake_index.py
r89 r92 99 99 >>> discover_file_type('some/directory/junk.pyc') 100 100 'pyc' 101 >>> discover_file_type('examples/readme.txt') 102 >>> discover_file_type('examples/runthis.py') 103 'demo' 101 104 """ 102 105 dirs = filename.split(os.path.sep) branches/mk/tests/unit/test_index_class.py
r80 r92 3 3 >>> import _path_cheesecake 4 4 >>> from cheesecake.cheesecake_index import Index 5 6 ***** 7 8 Default maximum value for an index should be 0. 9 >>> index = Index() 10 >>> index.max_value 11 0 12 13 ***** 5 14 6 15 Create two indices. … … 25 34 False 26 35 36 ***** 37 38 Test passing subindices to index constructor. 39 >>> def create_index(name): 40 ... idx = Index() 41 ... idx.name = name 42 ... return idx 43 44 >>> index_one = create_index('one') 45 >>> index_two = create_index('two') 46 >>> index_three = create_index('three') 47 >>> index = Index(index_one, index_two, index_three) 48 49 >>> def get_names(indices): 50 ... return map(lambda idx: idx.name, indices) 51 52 >>> get_names(index.subindices) 53 ['one', 'two', 'three'] 54 >>> index.remove_subindex('one') 55 >>> get_names(index.subindices) 56 ['two', 'three'] 57 58 ***** 59 27 60 Test requirements. 28 61 >>> class NewIndex(Index):
