MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_syslog

Method test_syslog

Lib/test/test_audit.py:234–255  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

232 self.assertEqual(actual, expected)
233
234 def test_syslog(self):
235 syslog = import_helper.import_module("syslog")
236
237 returncode, events, stderr = self.run_python("test_syslog")
238 if returncode:
239 self.fail(stderr)
240
241 if support.verbose:
242 print('Events:', *events, sep='\n ')
243
244 self.assertSequenceEqual(
245 events,
246 [('syslog.openlog', ' ', f'python 0 {syslog.LOG_USER}'),
247 ('syslog.syslog', ' ', f'{syslog.LOG_INFO} test'),
248 ('syslog.setlogmask', ' ', f'{syslog.LOG_DEBUG}'),
249 ('syslog.closelog', '', ''),
250 ('syslog.syslog', ' ', f'{syslog.LOG_INFO} test2'),
251 ('syslog.openlog', ' ', f'audit-tests.py 0 {syslog.LOG_USER}'),
252 ('syslog.openlog', ' ', f'audit-tests.py {syslog.LOG_NDELAY} {syslog.LOG_LOCAL0}'),
253 ('syslog.openlog', ' ', f'None 0 {syslog.LOG_USER}'),
254 ('syslog.closelog', '', '')]
255 )
256
257 def test_not_in_gc(self):
258 returncode, _, stderr = self.run_python("test_not_in_gc")

Callers

nothing calls this directly

Calls 5

run_pythonMethod · 0.95
assertSequenceEqualMethod · 0.80
printFunction · 0.50
import_moduleMethod · 0.45
failMethod · 0.45

Tested by

no test coverage detected