Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Leap:16.0:FactoryCandidates
python-systemd
fix_test_reader_this_machine.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File fix_test_reader_this_machine.patch of Package python-systemd
--- systemd/test/test_journal.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) --- a/systemd/test/test_journal.py +++ b/systemd/test/test_journal.py @@ -43,11 +43,11 @@ class MockSender: self.buf.append(args) @contextlib.contextmanager -def skip_oserror(code): +def skip_oserror(*errnos): try: yield except (OSError, IOError) as e: - if e.errno == code: + if e.errno in errnos: pytest.skip() raise @@ -233,9 +233,10 @@ def test_reader_this_boot(tmpdir): def test_reader_this_machine(tmpdir): j = journal.Reader(path=tmpdir.strpath) with j: - j.this_machine() - j.this_machine(TEST_MID) - j.this_machine(TEST_MID.hex) + with skip_oserror(errno.ENOENT, errno.ENOSYS, 123): + j.this_machine() + j.this_machine(TEST_MID) + j.this_machine(TEST_MID.hex) def test_reader_query_unique(tmpdir): j = journal.Reader(path=tmpdir.strpath)
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor