Hello community, here is the log from the commit of package python-evtx for openSUSE:Factory checked in at 2019-11-06 13:57:10 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-evtx (Old) and /work/SRC/openSUSE:Factory/.python-evtx.new.2990 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-evtx" Wed Nov 6 13:57:10 2019 rev:8 rq:745197 version:0.6.1 Changes: -------- --- /work/SRC/openSUSE:Factory/python-evtx/python-evtx.changes 2019-08-23 11:07:41.154473650 +0200 +++ /work/SRC/openSUSE:Factory/.python-evtx.new.2990/python-evtx.changes 2019-11-06 13:57:29.756245277 +0100 @@ -1,0 +2,5 @@ +Mon Nov 4 15:05:59 CET 2019 - Matej Cepl <mc...@suse.com> + +- Add pytest4.patch making the testsuite running again. + +------------------------------------------------------------------- New: ---- pytest4.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-evtx.spec ++++++ --- /var/tmp/diff_new_pack.RbFWiL/_old 2019-11-06 13:57:30.312245860 +0100 +++ /var/tmp/diff_new_pack.RbFWiL/_new 2019-11-06 13:57:30.312245860 +0100 @@ -22,12 +22,14 @@ Release: 0 Summary: Windows Event Log files parser License: Apache-2.0 -Group: Development/Libraries/Python URL: https://github.com/williballenthin/python-evtx Source: https://github.com/williballenthin/python-evtx/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz +# PATCH-FIX-UPSTREAM pytest4.patch gh#williballenthin/python-evtx#66 mc...@suse.com +# make the test suite pass under pytest 4 +Patch0: pytest4.patch BuildRequires: %{python_module hexdump} BuildRequires: %{python_module lxml} -BuildRequires: %{python_module pytest < 4} +BuildRequires: %{python_module pytest} BuildRequires: %{python_module setuptools} BuildRequires: dos2unix BuildRequires: fdupes @@ -48,6 +50,8 @@ %prep %setup -q +%autopatch -p1 + find Evtx -name "*.py" | xargs sed -i '1 { /^#!/ d }' %build ++++++ pytest4.patch ++++++ --- a/tests/fixtures.py +++ b/tests/fixtures.py @@ -21,7 +21,7 @@ def system_path(): @pytest.yield_fixture -def system(): +def system(system_path): ''' yields the contents of the system.evtx test file. the returned value is a memory map of the contents, @@ -30,8 +30,7 @@ def system(): Returns: mmap.mmap: the contents of the test file. ''' - p = system_path() - with open(p, 'rb') as f: + with open(system_path, 'rb') as f: with contextlib.closing(mmap.mmap(f.fileno(), 0, access=mmap.ACCESS_READ)) as buf: yield buf @@ -52,7 +51,7 @@ def security_path(): @pytest.yield_fixture -def security(): +def security(security_path): ''' yields the contents of the security.evtx test file. the returned value is a memory map of the contents, @@ -61,8 +60,7 @@ def security(): Returns: mmap.mmap: the contents of the test file. ''' - p = security_path() - with open(p, 'rb') as f: + with open(security_path, 'rb') as f: with contextlib.closing(mmap.mmap(f.fileno(), 0, access=mmap.ACCESS_READ)) as buf: yield buf --- a/tests/test_records.py +++ b/tests/test_records.py @@ -248,7 +248,7 @@ def test_parse_record(system): ['EndOfStreamNode']]]]], ['Substitutions', None, [ ['WstringTypeNode', 'System'], - ['WstringTypeNode', 'C:\Windows\System32\Winevt\Logs\Archive-System-2012-03-14-04-17-39-932.evtx']]]]]]]]]]] + ['WstringTypeNode', 'C:\\Windows\\System32\\Winevt\\Logs\\Archive-System-2012-03-14-04-17-39-932.evtx']]]]]]]]]]] assert extract_structure(record.root()) == expected @@ -264,7 +264,7 @@ def test_render_record(system): chunk = one(fh.chunks()) record = one(chunk.records()) - xml = record.xml() + xml = record.xml() assert xml == textwrap.dedent('''\ <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event"><System><Provider Name="Microsoft-Windows-Eventlog" Guid="{fc65ddd8-d6ef-4962-83d5-6e5cfe9ce148}"></Provider> <EventID Qualifiers="">105</EventID>