895
896
def test_add_file_not_excluded(self):
897
('fid', (None, 'newpath'),
898
0, (False, False), ('pid', 'pid'), ('newpath', 'newpath'),
899
('file', 'file'), (True, True))]
899
'fid', (None, 'newpath'),
900
0, (False, False), ('pid', 'pid'), ('newpath', 'newpath'),
901
('file', 'file'), (True, True))]
900
902
self.assertEqual(changes, list(
901
903
filter_excluded(changes, ['otherpath'])))
903
905
def test_add_file_excluded(self):
905
('fid', (None, 'newpath'),
906
0, (False, False), ('pid', 'pid'), ('newpath', 'newpath'),
907
('file', 'file'), (True, True))]
908
'fid', (None, 'newpath'),
909
0, (False, False), ('pid', 'pid'), ('newpath', 'newpath'),
910
('file', 'file'), (True, True))]
908
911
self.assertEqual([], list(filter_excluded(changes, ['newpath'])))
910
913
def test_delete_file_excluded(self):
912
('fid', ('somepath', None),
913
0, (False, None), ('pid', None), ('newpath', None),
914
('file', None), (True, None))]
916
'fid', ('somepath', None),
917
0, (False, None), ('pid', None), ('newpath', None),
918
('file', None), (True, None))]
915
919
self.assertEqual([], list(filter_excluded(changes, ['somepath'])))
917
921
def test_move_from_or_to_excluded(self):
919
('fid', ('oldpath', 'newpath'),
920
0, (False, False), ('pid', 'pid'), ('oldpath', 'newpath'),
921
('file', 'file'), (True, True))]
924
'fid', ('oldpath', 'newpath'),
925
0, (False, False), ('pid', 'pid'), ('oldpath', 'newpath'),
926
('file', 'file'), (True, True))]
922
927
self.assertEqual([], list(filter_excluded(changes, ['oldpath'])))
923
928
self.assertEqual([], list(filter_excluded(changes, ['newpath'])))