Skip to content

Commit

Permalink
Add: Add test for update-header passing files and directories
Browse files Browse the repository at this point in the history
  • Loading branch information
bjoernricks committed Feb 26, 2024
1 parent 356089d commit a503ff2
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/updateheader/test_header.py
Original file line number Diff line number Diff line change
Expand Up @@ -430,6 +430,16 @@ def test_defaults(self):
self.assertIsNone(args.exclude_file)
self.assertFalse(args.cleanup)

def test_files_and_directories_mutual_exclusive(self):
args = ["--files", "foo", "--directories", "bar"]
with self.assertRaises(SystemExit) as cm:
args = parse_args(args)

self.assertIn(
"argument -d/--directories: not allowed with argument -f/--file",
cm.msg,
)


class GetExcludeListTestCase(TestCase):
def test_get_exclude_list(self):
Expand Down

0 comments on commit a503ff2

Please sign in to comment.