(self)
| 1118 | |
| 1119 | @support.force_not_colorized |
| 1120 | def test_help(self): |
| 1121 | stdout = self.run_cmd_ok('-h') |
| 1122 | self.assertIn(b'usage:', stdout) |
| 1123 | self.assertIn(b' -m calendar ', stdout) |
| 1124 | self.assertIn(b'--help', stdout) |
| 1125 | |
| 1126 | # special case: stdout but sys.exit() |
| 1127 | with self.captured_stdout_with_buffer() as output: |
| 1128 | self.assertRaises(SystemExit, calendar.main, ['-h']) |
| 1129 | output = output.buffer.read() |
| 1130 | self.assertIn(b'usage:', output) |
| 1131 | self.assertIn(b'--help', output) |
| 1132 | |
| 1133 | def test_illegal_arguments(self): |
| 1134 | self.assertFailure('-z') |
nothing calls this directly
no test coverage detected