diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2022-08-16 10:35:10 +0200 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2022-08-16 11:03:09 +0200 |
commit | cc03ed6d2013f40c5e20efa2af8d822a47c592b2 (patch) | |
tree | 4aee9b588b42163f6b86c16affc430d673108a2b | |
parent | ba9d9f89104a26a410e1eb9e371d366ef2702c35 (diff) | |
download | python-systemd-cc03ed6d2013f40c5e20efa2af8d822a47c592b2.tar.gz |
tests: simplify imports
'import foo as _foo' is useful in exported modules to avoid 'foo' being
present in the public API. No need to play that game in test code.
-rw-r--r-- | systemd/test/test_journal.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/systemd/test/test_journal.py b/systemd/test/test_journal.py index 98c7e87..c192136 100644 --- a/systemd/test/test_journal.py +++ b/systemd/test/test_journal.py @@ -7,7 +7,7 @@ import os import time import uuid import sys -import traceback as _traceback +import traceback from systemd import journal, id128 from systemd.journal import _make_line @@ -31,7 +31,7 @@ class MockSender: args.append('MESSAGE_ID=' + id) if CODE_LINE is CODE_FILE is CODE_FUNC is None: - CODE_FILE, CODE_LINE, CODE_FUNC = _traceback.extract_stack(limit=2)[0][:3] + CODE_FILE, CODE_LINE, CODE_FUNC = traceback.extract_stack(limit=2)[0][:3] if CODE_FILE is not None: args.append('CODE_FILE=' + CODE_FILE) if CODE_LINE is not None: |