Skip to content

Commit

Permalink
pythongh-69714: Add more test cases to calendar cmdline
Browse files Browse the repository at this point in the history
  • Loading branch information
bxsx committed Jun 9, 2022
1 parent 636b4e1 commit 238c527
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Lib/test/test_calendar.py
Original file line number Diff line number Diff line change
Expand Up @@ -934,6 +934,15 @@ def test_illegal_arguments(self):
self.assertFailure('2004', 'spam')
self.assertFailure('-t', 'html', '2004', '1')

def test_too_many_arguments(self):
stderr = self.assertCmdFails('--type', 'html', '2004', '5')[2]
self.assertIn(b'error', stderr)
self.assertIn(b'incorrect number of arguments', stderr)

stderr = self.assertCLIFails('--type', 'html', '2004', '5')
self.assertIn(b'error', stderr)
self.assertIn(b'incorrect number of arguments', stderr)

def test_output_current_year(self):
for run in self.runners:
output = run()
Expand Down

0 comments on commit 238c527

Please sign in to comment.