Skip to content

Commit

Permalink
also test deprecated behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
Samuel Moors committed Dec 28, 2021
1 parent a941d71 commit 2621809
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/framework/filetools.py
Original file line number Diff line number Diff line change
Expand Up @@ -1632,6 +1632,10 @@ def test_create_patch_info(self):
self.assertEqual(ft.create_patch_info(('foo.patch', 'subdir')), {'name': 'foo.patch', 'sourcepath': 'subdir'})
self.assertEqual(ft.create_patch_info(('foo.txt', 'subdir')), {'name': 'foo.txt', 'copy': 'subdir'})

self.allow_deprecated_behaviour()
self.assertEqual(ft.create_patch_info('foo.txt'), {'name': 'foo.txt'})
self.disallow_deprecated_behaviour()

# deprecation warning (which is an error in this context)
error_pattern = "Add '.patch' suffix to patch file, or use 2-element list/tuple to specify "
error_pattern += "path to where non-patch file should be copied: foo.txt"
Expand Down

0 comments on commit 2621809

Please sign in to comment.