Skip to content

Commit

Permalink
Test incompatibility of -o/--output with multiple inputs
Browse files Browse the repository at this point in the history
  • Loading branch information
RickyDaMa committed Aug 8, 2024
1 parent 703b7fe commit 87f1685
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/test_ufonormalizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -1437,6 +1437,13 @@ def test_main_input_not_ufo(self):
main([existing_not_ufo_file])
self.assertLogsContain(logs, "Skipping input path that isn't a UFO")

def test_main_multiple_inputs_and_output(self):
stream = StringIO()
with self.assertRaisesRegex(SystemExit, '2'):
with redirect_stderr(stream):
main(['--output', 'foo', 'bar', 'baz'])
self.assertIn("can't use -o/--output with multiple input UFOs", stream.getvalue())

def test_main_invalid_float_precision(self):
stream = StringIO()
with TemporaryDirectory(suffix=".ufo") as tmp:
Expand Down

0 comments on commit 87f1685

Please sign in to comment.