(self)
| 241 | self.assertEqual(actual, expected) |
| 242 | |
| 243 | def test_syslog(self): |
| 244 | syslog = import_helper.import_module("syslog") |
| 245 | |
| 246 | returncode, events, stderr = self.run_python("test_syslog") |
| 247 | if returncode: |
| 248 | self.fail(stderr) |
| 249 | |
| 250 | if support.verbose: |
| 251 | print('Events:', *events, sep='\n ') |
| 252 | |
| 253 | self.assertSequenceEqual( |
| 254 | events, |
| 255 | [('syslog.openlog', ' ', f'python 0 {syslog.LOG_USER}'), |
| 256 | ('syslog.syslog', ' ', f'{syslog.LOG_INFO} test'), |
| 257 | ('syslog.setlogmask', ' ', f'{syslog.LOG_DEBUG}'), |
| 258 | ('syslog.closelog', '', ''), |
| 259 | ('syslog.syslog', ' ', f'{syslog.LOG_INFO} test2'), |
| 260 | ('syslog.openlog', ' ', f'audit-tests.py 0 {syslog.LOG_USER}'), |
| 261 | ('syslog.openlog', ' ', f'audit-tests.py {syslog.LOG_NDELAY} {syslog.LOG_LOCAL0}'), |
| 262 | ('syslog.openlog', ' ', f'None 0 {syslog.LOG_USER}'), |
| 263 | ('syslog.closelog', '', '')] |
| 264 | ) |
| 265 | |
| 266 | def test_not_in_gc(self): |
| 267 | returncode, _, stderr = self.run_python("test_not_in_gc") |
nothing calls this directly
no test coverage detected