def test_leave_suffix(self): filename = 'file.1' filenames = [] filename_suffix = _suffix_number(filename, filenames) self.assertEqual(filename_suffix, 'file.1')
def test_double_suffix(self): filename = 'file.1.0' filenames = ['file.1.0.gz'] filename_suffix = _suffix_number(filename, filenames) self.assertEqual(filename_suffix, 'file.1.1')
def test_num_between(self): filename = 'file' filenames = ['file.0.gz', 'file.2.gz'] filename_suffix = _suffix_number(filename, filenames) self.assertEqual(filename_suffix, 'file.1')
def test_inc_suffix_number(self): filename = 'file.0' filenames = ['file.0.gz', 'file.1.gz'] filename_suffix = _suffix_number(filename, filenames) self.assertEqual(filename_suffix, 'file.2')
def test_add_suffix_to_number(self): filename = 'file1' filenames = ['file1.gz'] filename_suffix = _suffix_number(filename, filenames) self.assertEqual(filename_suffix, 'file1.0')
def test_skip_two_nums(self): filename = 'file' filenames = ['file.0.gz', 'file.1.gz'] filename_suffix = _suffix_number(filename, filenames) self.assertEqual(filename_suffix, 'file.2')
def test_add_suffix(self): filename = 'file' filenames = [] filename_suffix = _suffix_number(filename, filenames) self.assertEqual(filename_suffix, 'file.0')