Esempio n. 1
0
 def test_changes_nested(self):
     existing = Path(self.nested, 'existing_nested.txt')
     existing.write_text('text', encoding='UTF-8')
     self.assertTrue(repo_file_add_or_changed(self.repo, existing))
Esempio n. 2
0
 def test_new_nested(self):
     existing = Path(self.nested, 'existing.txt')
     existing.touch()
     self.assertTrue(repo_file_add_or_changed(self.repo, existing))
Esempio n. 3
0
 def test_changes(self):
     existing = Path(self.working, 'existing.txt')
     existing.write_text('I made a change', encoding='UTF-8')
     self.assertTrue(repo_file_add_or_changed(self.repo, existing))
Esempio n. 4
0
 def test_no_changes(self):
     existing = Path(self.working, 'existing.txt')
     existing.touch()
     self.assertFalse(repo_file_add_or_changed(self.repo, existing))
Esempio n. 5
0
 def test_new_file(self):
     new_file = Path(self.working, 'newfile.txt')
     new_file.touch()
     self.assertTrue(repo_file_add_or_changed(self.repo, new_file))
Esempio n. 6
0
 def test_no_file(self):
     no_file = Path(self.working, 'newfile.txt')
     self.assertFalse(repo_file_add_or_changed(self.repo, no_file))