Changeset 1594 in tailor


Ignore:
Timestamp:
06/01/08 10:19:16 (5 years ago)
Author:
lele@…
Hash name:
20080601081916-97f81-07549e30dbe9ec2bc4531e91e34d524f926411c0
Message:

Test that changing the entries does not interfere with the journaling

File:
1 edited

Legend:

Unmodified
Added
Removed
  • vcpx/tests/statefile.py

    r1517 r1594  
    9090                  Entry(Entry.ADDED, 'dir/a3'), 
    9191                ]), 
     92            Changeset("Initially empty", []), 
    9293            Changeset("Spread around", 
    9394                [ Entry(Entry.RENAMED, 'a.root', 'dir/a1'), 
     
    120121        cs = sf.next() 
    121122        self.assertEqual(cs, changesets[1]) 
     123 
     124        # Some source backends refine the just applied changeset, 
     125        # usually adding entries. Be sure that does not interfere 
     126        # with the journal 
     127        cs.entries.append(Entry(Entry.ADDED, 'dir2')) 
     128        self.assertEqual(cs, changesets[1]) 
     129        self.assertNotEqual(len(cs.entries), len(changesets[1].entries)) 
    122130        sf.applied() 
    123131        self.assertEqual(sf.lastAppliedChangeset(), changesets[1]) 
    124132 
     133        sf = StateFile(rontf.name, None) 
     134        self.assertEqual(sf.lastAppliedChangeset(), changesets[1]) 
     135        cs = sf.next() 
     136 
    125137        self.assertRaises(StopIteration, sf.next) 
Note: See TracChangeset for help on using the changeset viewer.