Example #1
0
 def test_next_seqnum_with_no_values_so_far(self):
     """
     If there are no sequenced files so far the sequence number returned
     should be "00001".
     """
     files = ['Web.mp3', 'Xen.mp3']
     self.assertEqual(1, next_seqnum(files))
Example #2
0
 def test_next_seqnum_with_negative_prefix(self):
     """
     For files with negative numeric prefixes the returned value
     should be "00001".
     """
     files = ['-001-Web.mp3', '-112 Xen.mp3']
     self.assertEqual(1, next_seqnum(files))
Example #3
0
 def test_next_seqnum(self):
     """The next unused sequence number is returned."""
     files = ['999- Web.mp3', '  035- Web.mp3']
     self.assertEqual(1000, next_seqnum(files))