I havent gotten typecode-libmagic working yet, so some of these are likely attributed to that. Still, the tests should detect missing typecode-libmagic and expect slightly different results where possible.
[ 30s]
[ 30s] =================================== FAILURES ===================================
[ 30s] ____________ TestContentTypeComplex.test_compiled_java_classfile_1 _____________
[ 30s]
[ 30s] self = <test_contenttype.TestContentTypeComplex testMethod=test_compiled_java_classfile_1>
[ 30s]
[ 30s] @pytest.mark.xfail(
[ 30s] on_mac or on_windows, reason='Somehow we get really weird results on macOS with libmagic 5.38 and mac, win32 on libmagic 5.39: '
[ 30s] '[64-bit architecture=6893422] [64-bit architecture=6649701] [architecture=1075809] [architecture=3959150] [architecture=768]')
[ 30s] def test_compiled_java_classfile_1(self):
[ 30s] test_file = self.get_test_loc('contenttype/compiled/java/CommonViewerSiteFactory.class')
[ 30s] > assert get_filetype(test_file) == 'compiled java class data, version 46.0 (java 1.2)'
[ 30s] E AssertionError: assert 'cafe babe compiled java class data, version 46.0 (java 1.2)' == 'compiled java class data, version 46.0 (java 1.2)'
[ 30s] E - compiled java class data, version 46.0 (java 1.2)
[ 30s] E + cafe babe compiled java class data, version 46.0 (java 1.2)
[ 30s] E ? ++++++++++
[ 30s]
[ 30s] tests/test_contenttype.py:237: AssertionError
[ 30s] ____________ TestContentTypeComplex.test_compiled_java_classfile_2 _____________
[ 30s]
[ 30s] self = <test_contenttype.TestContentTypeComplex testMethod=test_compiled_java_classfile_2>
[ 30s]
[ 30s] @pytest.mark.xfail(on_mac or on_windows, reason='Somehow we get really weird results on macOS with libmagic 5.38 and mac, win32 on libmagic 5.39: '
[ 30s] '[64-bit architecture=6893422] [64-bit architecture=6649701] [architecture=1075809] [architecture=3959150] [architecture=768]')
[ 30s] def test_compiled_java_classfile_2(self):
[ 30s] test_file = self.get_test_loc('contenttype/compiled/java/old.class')
[ 30s] assert is_binary(test_file)
[ 30s] > assert get_filetype(test_file) == 'compiled java class data, version 46.0 (java 1.2)'
[ 30s] E AssertionError: assert 'cafe babe compiled java class data, version 46.0 (java 1.2)' == 'compiled java class data, version 46.0 (java 1.2)'
[ 30s] E - compiled java class data, version 46.0 (java 1.2)
[ 30s] E + cafe babe compiled java class data, version 46.0 (java 1.2)
[ 30s] E ? ++++++++++
[ 30s]
[ 30s] tests/test_contenttype.py:245: AssertionError
[ 30s] ________________ TestContentTypeComplex.test_compiled_python_1 _________________
[ 30s]
[ 30s] self = <test_contenttype.TestContentTypeComplex testMethod=test_compiled_python_1>
[ 30s]
[ 30s] def test_compiled_python_1(self):
[ 30s] test_dir = self.extract_test_zip('contenttype/compiled/python/compiled.zip')
[ 30s] test_file = os.path.join(test_dir, 'command.pyc')
[ 30s] assert get_filetype(test_file) == 'python 2.5 byte-compiled'
[ 30s] assert not is_source(test_file)
[ 30s] assert not is_text(test_file)
[ 30s] expected_mime = (
[ 30s] 'application/octet-stream',
[ 30s] # libmagic 5.39
[ 30s] 'text/x-bytecode.python',
[ 30s] )
[ 30s] > assert get_mimetype_file(test_file) in expected_mime
[ 30s] E AssertionError: assert 'application/x-bytecode.python' in ('application/octet-stream', 'text/x-bytecode.python')
[ 30s] E + where 'application/x-bytecode.python' = get_mimetype_file('/tmp/scancode-tk-tests -kj5rofsz/d9627_iy/compiled.zip/command.pyc')
[ 30s]
[ 30s] tests/test_contenttype.py:259: AssertionError
[ 30s] ___________________ TestContentTypeComplex.test_package_json ___________________
[ 30s]
[ 30s] self = <test_contenttype.TestContentTypeComplex testMethod=test_package_json>
[ 30s]
[ 30s] def test_package_json(self):
[ 30s] test_file = self.get_test_loc('contenttype/package/package.json')
[ 30s] expected = (
[ 30s] 'ascii text, with very long lines',
[ 30s] # libmagic 5.39+
[ 30s] 'json data',
[ 30s] )
[ 30s]
[ 30s] > assert get_filetype(test_file) in expected
[ 30s] E AssertionError: assert 'json text data' in ('ascii text, with very long lines', 'json data')
[ 30s] E + where 'json text data' = get_filetype('/home/abuild/rpmbuild/BUILD/typecode-30.0.0/tests/data/contenttype/package/package.json')
[ 30s]
[ 30s] tests/test_contenttype.py:146: AssertionError
[ 30s] _________ TestFileTypesDataDriven.test_filetest_build_ar_er_css_map_27 _________
[ 30s]
[ 30s] args = (<test_types.TestFileTypesDataDriven object at 0xf5c7f9b8>,), kwargs = {}
[ 30s] results = {'contains_text': True, 'elf_type': '', 'filetype_file': 'JSON text data', 'filetype_pygment': '', ...}
[ 30s] expected = OrderedDict([('filetype_file', 'JSON data'), ('mimetype_file', 'application/json'), ('mimetype_python', ''), ('filetyp...ap.yml'), ('test_file', 'file:///home/abuild/rpmbuild/BUILD/typecode-30.0.0/tests/data/filetest/build/ar-ER.css.map')])
[ 30s] passing = False
[ 30s] @py_assert2 = {'contains_text': True, 'elf_type': '', 'filetype_file': 'JSON text data', 'filetype_pygment': '', ...}
[ 30s] @py_assert7 = {'contains_text': True, 'data file': 'file:///home/abuild/rpmbuild/BUILD/typecode-30.0.0/tests/data/filetest/build/ar-ER.css.map.yml', 'elf_type': '', 'filetype_file': 'JSON data', ...}
[ 30s] @py_assert4 = False
[ 30s] @py_format9 = "{'contains_text': True,\\n 'elf_type': '',\\n 'filetype_file': 'JSON text data',\\n 'filetype_pygment': '',\\n 'is_ar...\n~- 'test_file': 'file:///home/abuild/rpmbuild/BUILD/typecode-30.0.0/tests/data/filetest/build/ar-ER.css.map',\n~ }"
[ 30s] @py_format11 = "assert {'contains_text': True,\\n 'elf_type': '',\\n 'filetype_file': 'JSON text data',\\n 'filetype_pygment': '',\\n...\n~- 'test_file': 'file:///home/abuild/rpmbuild/BUILD/typecode-30.0.0/tests/data/filetest/build/ar-ER.css.map',\n~ }"
[ 30s]
[ 30s] def closure_test_function(*args, **kwargs):
[ 30s] results = get_type(test_file).to_dict(include_date=False)
[ 30s]
[ 30s] if regen:
[ 30s] for key, value in results.items():
[ 30s] setattr(test, key, value)
[ 30s] test.dump()
[ 30s]
[ 30s] expected = test.to_dict(filter_empty=False, filter_extra=True)
[ 30s] passing = check_types_equal(expected, results)
[ 30s]
[ 30s] # this is done to display slightly eaier to handle error traces
[ 30s] if not passing:
[ 30s] expected['data file'] = 'file://' + data_file
[ 30s] expected['test_file'] = 'file://' + test_file
[ 30s] > assert dict(results) == dict(expected)
[ 30s] E AssertionError: assert {...}
[ 30s] E Differing items:
[ 30s] E {'filetype_file': 'JSON text data'} != {'filetype_file': 'JSON data'}
[ 30s] E Right contains 2 more items:
[ 30s] E {'data file': 'file:///home/abuild/rpmbuild/BUILD/typecode-30.0.0/tests/data/filetest/build/ar-ER.css.map.yml',
[ 30s] E 'test_file': 'file:///home/abuild/rpmbuild/BUILD/typecode-30.0.0/tests/data/filetest/build/ar-ER.css.map'}
[ 30s]
[ 30s] tests/filetype_test_utils.py:216: AssertionError
[ 30s] _________ TestFileTypesDataDriven.test_filetest_build_ar_er_js_map_28 __________
same as above
[ 30s] tests/filetype_test_utils.py:216: AssertionError
[ 30s] ____ TestFileTypesDataDriven.test_filetest_code_scala_applicative_scala_62 _____
[ 30s]
[ 30s] args = (<test_types.TestFileTypesDataDriven object at 0xf5f7e2b0>,), kwargs = {}
[ 30s] results = {'contains_text': True, 'elf_type': '', 'filetype_file': 'Unicode text, UTF-8 text', 'filetype_pygment': 'Scala', ...}
[ 30s] expected = OrderedDict([('filetype_file', 'UTF-8 Unicode text'), ('mimetype_file', 'text/plain'), ('mimetype_python', ''), ('file... ('test_file', 'file:///home/abuild/rpmbuild/BUILD/typecode-30.0.0/tests/data/filetest/code/scala/Applicative.scala')])
[ 30s] passing = False
[ 30s] @py_assert2 = {'contains_text': True, 'elf_type': '', 'filetype_file': 'Unicode text, UTF-8 text', 'filetype_pygment': 'Scala', ...}
[ 30s] @py_assert7 = {'contains_text': True, 'data file': 'file:///home/abuild/rpmbuild/BUILD/typecode-30.0.0/tests/data/filetest/code/scala/Applicative.scala.yml', 'elf_type': '', 'filetype_file': 'UTF-8 Unicode text', ...}
[ 30s] @py_assert4 = False
[ 30s] @py_format9 = "{'contains_text': True,\\n 'elf_type': '',\\n 'filetype_file': 'Unicode text, UTF-8 text',\\n 'filetype_pygment': 'Sc...st_file': 'file:///home/abuild/rpmbuild/BUILD/typecode-30.0.0/tests/data/filetest/code/scala/Applicative.scala',\n~ }"
[ 30s] @py_format11 = "assert {'contains_text': True,\\n 'elf_type': '',\\n 'filetype_file': 'Unicode text, UTF-8 text',\\n 'filetype_pygmen...st_file': 'file:///home/abuild/rpmbuild/BUILD/typecode-30.0.0/tests/data/filetest/code/scala/Applicative.scala',\n~ }"
[ 30s]
[ 30s] def closure_test_function(*args, **kwargs):
[ 30s] results = get_type(test_file).to_dict(include_date=False)
[ 30s]
[ 30s] if regen:
[ 30s] for key, value in results.items():
[ 30s] setattr(test, key, value)
[ 30s] test.dump()
[ 30s]
[ 30s] expected = test.to_dict(filter_empty=False, filter_extra=True)
[ 30s] passing = check_types_equal(expected, results)
[ 30s]
[ 30s] # this is done to display slightly eaier to handle error traces
[ 30s] if not passing:
[ 30s] expected['data file'] = 'file://' + data_file
[ 30s] expected['test_file'] = 'file://' + test_file
[ 30s] > assert dict(results) == dict(expected)
[ 30s] E AssertionError: assert {..}
[ 30s] E Differing items:
[ 30s] E {'filetype_file': 'Unicode text, UTF-8 text'} != {'filetype_file': 'UTF-8 Unicode text'}
[ 30s] E Right contains 2 more items:
[ 30s] E {'data file': 'file:///home/abuild/rpmbuild/BUILD/typecode-30.0.0/tests/data/filetest/code/scala/Applicative.scala.yml',
[ 30s] E 'test_file': 'file:///home/abuild/rpmbuild/BUILD/typecode-30.0.0/tests/data/filetest/code/scala/Applicative.scala'}
[ 30s] tests/filetype_test_utils.py:216: AssertionError
[ 30s] _ TestFileTypesDataDriven.test_filetest_compiled_flash_flash_haloclassic_swc_incr_65 _
[ 30s]
[ 30s] args = (<test_types.TestFileTypesDataDriven object at 0xf5f7e400>,), kwargs = {}
[ 30s] results = {'contains_text': True, 'elf_type': '', 'filetype_file': 'FILE_SIZE=207900', 'filetype_pygment': '', ...}
[ 30s] expected = OrderedDict([('filetype_file', 'data'), ('mimetype_file', 'application/octet-stream'), ('mimetype_python', ''), ('file..., 'file:///home/abuild/rpmbuild/BUILD/typecode-30.0.0/tests/data/filetest/compiled/flash/flash-haloclassic.swc.incr')])
[ 30s] passing = False
[ 30s] @py_assert2 = {'contains_text': True, 'elf_type': '', 'filetype_file': 'FILE_SIZE=207900', 'filetype_pygment': '', ...}
[ 30s] @py_assert7 = {'contains_text': True, 'data file': 'file:///home/abuild/rpmbuild/BUILD/typecode-30.0.0/tests/data/filetest/compiled/flash/flash-haloclassic.swc.incr.yml', 'elf_type': '', 'filetype_file': 'data', ...}
[ 30s] @py_assert4 = False
[ 30s] @py_format9 = "{'contains_text': True,\\n 'elf_type': '',\\n 'filetype_file': 'FILE_SIZE=207900',\\n 'filetype_pygment': '',\\n 'is_...le:///home/abuild/rpmbuild/BUILD/typecode-30.0.0/tests/data/filetest/compiled/flash/flash-haloclassic.swc.incr',\n~ }"
[ 30s] @py_format11 = "assert {'contains_text': True,\\n 'elf_type': '',\\n 'filetype_file': 'FILE_SIZE=207900',\\n 'filetype_pygment': '',\...le:///home/abuild/rpmbuild/BUILD/typecode-30.0.0/tests/data/filetest/compiled/flash/flash-haloclassic.swc.incr',\n~ }"
[ 30s]
[ 30s] def closure_test_function(*args, **kwargs):
[ 30s] results = get_type(test_file).to_dict(include_date=False)
[ 30s]
[ 30s] if regen:
[ 30s] for key, value in results.items():
[ 30s] setattr(test, key, value)
[ 30s] test.dump()
[ 30s]
[ 30s] expected = test.to_dict(filter_empty=False, filter_extra=True)
[ 30s] passing = check_types_equal(expected, results)
[ 30s]
[ 30s] # this is done to display slightly eaier to handle error traces
[ 30s] if not passing:
[ 30s] expected['data file'] = 'file://' + data_file
[ 30s] expected['test_file'] = 'file://' + test_file
[ 30s] > assert dict(results) == dict(expected)
[ 30s] E AssertionError: assert {...}
[ 30s] E Differing items:
[ 30s] E {'filetype_file': 'FILE_SIZE=207900'} != {'filetype_file': 'data'}
[ 30s] E {'is_data': False} != {'is_data': True}
[ 30s] E Right contains 2 more items:
[ 30s] E {'data file': 'file:///home/abuild/rpmbuild/BUILD/typecode-30.0.0/tests/data/filetest/compiled/flash/flash-haloclassic.swc.incr.yml',
[ 30s] E 'test_file': 'file:///home/abuild/rpmbuild/BUILD/typecode-30.0.0/tests/data/filetest/compiled/flash/flash-haloclassic.swc.incr'}
[ 30s] tests/filetype_test_utils.py:216: AssertionError
[ 30s] ___________ TestFileTypesDataDriven.test_filetest_data_mysql_arch_74 ___________
[ 30s]
[ 30s] args = (<test_types.TestFileTypesDataDriven object at 0xf5f7e838>,), kwargs = {}
[ 30s] results = {'contains_text': True, 'elf_type': '', 'filetype_file': 'MySQL table definition file Version -32, type DIAM_ISAM, MySQL version -1515870811', 'filetype_pygment': '', ...}
[ 30s] expected = OrderedDict([('filetype_file', 'MySQL table definition file Version 224, type DIAM_ISAM, MySQL version -1515870811'), ...l-arch.yml'), ('test_file', 'file:///home/abuild/rpmbuild/BUILD/typecode-30.0.0/tests/data/filetest/data/mysql-arch')])
[ 30s] passing = False
[ 30s] @py_assert2 = {'contains_text': True, 'elf_type': '', 'filetype_file': 'MySQL table definition file Version -32, type DIAM_ISAM, MySQL version -1515870811', 'filetype_pygment': '', ...}
[ 30s] @py_assert7 = {'contains_text': True, 'data file': 'file:///home/abuild/rpmbuild/BUILD/typecode-30.0.0/tests/data/filetest/data/mysq..._type': '', 'filetype_file': 'MySQL table definition file Version 224, type DIAM_ISAM, MySQL version -1515870811', ...}
[ 30s] @py_assert4 = False
[ 30s] @py_format9 = "{'contains_text': True,\\n 'elf_type': '',\\n 'filetype_file': 'MySQL table definition file Version -32, type DIAM_IS...612,\n~- 'test_file': 'file:///home/abuild/rpmbuild/BUILD/typecode-30.0.0/tests/data/filetest/data/mysql-arch',\n~ }"
[ 30s] @py_format11 = "assert {'contains_text': True,\\n 'elf_type': '',\\n 'filetype_file': 'MySQL table definition file Version -32, type ...612,\n~- 'test_file': 'file:///home/abuild/rpmbuild/BUILD/typecode-30.0.0/tests/data/filetest/data/mysql-arch',\n~ }"
[ 30s]
[ 30s] def closure_test_function(*args, **kwargs):
[ 30s] results = get_type(test_file).to_dict(include_date=False)
[ 30s]
[ 30s] if regen:
[ 30s] for key, value in results.items():
[ 30s] setattr(test, key, value)
[ 30s] test.dump()
[ 30s]
[ 30s] expected = test.to_dict(filter_empty=False, filter_extra=True)
[ 30s] passing = check_types_equal(expected, results)
[ 30s]
[ 30s] # this is done to display slightly eaier to handle error traces
[ 30s] if not passing:
[ 30s] expected['data file'] = 'file://' + data_file
[ 30s] expected['test_file'] = 'file://' + test_file
[ 30s] > assert dict(results) == dict(expected)
[ 30s] E AssertionError: assert {...}
[ 30s] E Differing items:
[ 30s] E {'filetype_file': 'MySQL table definition file Version -32, type DIAM_ISAM, MySQL version -1515870811'} != {'filetype_file': 'MySQL table definition file Version 224, type DIAM_ISAM, MySQL version -1515870811'}
[ 30s] E Right contains 2 more items:
[ 30s] E {'data file': 'file:///home/abuild/rpmbuild/BUILD/typecode-30.0.0/tests/data/filetest/data/mysql-arch.yml',
[ 30s] E 'test_file': 'file:///home/abuild/rpmbuild/BUILD/typecode-30.0.0/tests/data/filetest/data/mysql-arch'}
[ 30s] tests/filetype_test_utils.py:216: AssertionError
[ 30s] ___________ TestFileTypesDataDriven.test_filetest_data_nulls_txt_78 ____________
[ 30s]
[ 30s] args = (<test_types.TestFileTypesDataDriven object at 0xf5c7fa18>,), kwargs = {}
[ 30s] results = {'contains_text': True, 'elf_type': '', 'filetype_file': 'ASCII text, with very long lines (10000), with no line terminators', 'filetype_pygment': '', ...}
[ 30s] expected = OrderedDict([('filetype_file', 'ASCII text, with very long lines, with no line terminators'), ('mimetype_file', 'text/...lls.txt.yml'), ('test_file', 'file:///home/abuild/rpmbuild/BUILD/typecode-30.0.0/tests/data/filetest/data/nulls.txt')])
[ 30s] passing = False
[ 30s] @py_assert2 = {'contains_text': True, 'elf_type': '', 'filetype_file': 'ASCII text, with very long lines (10000), with no line terminators', 'filetype_pygment': '', ...}
[ 30s] @py_assert7 = {'contains_text': True, 'data file': 'file:///home/abuild/rpmbuild/BUILD/typecode-30.0.0/tests/data/filetest/data/nulls.txt.yml', 'elf_type': '', 'filetype_file': 'ASCII text, with very long lines, with no line terminators', ...}
[ 30s] @py_assert4 = False
[ 30s] @py_format9 = "{'contains_text': True,\\n 'elf_type': '',\\n 'filetype_file': 'ASCII text, with very long lines (10000), with no lin...0000,\n~- 'test_file': 'file:///home/abuild/rpmbuild/BUILD/typecode-30.0.0/tests/data/filetest/data/nulls.txt',\n~ }"
[ 30s] @py_format11 = "assert {'contains_text': True,\\n 'elf_type': '',\\n 'filetype_file': 'ASCII text, with very long lines (10000), with...0000,\n~- 'test_file': 'file:///home/abuild/rpmbuild/BUILD/typecode-30.0.0/tests/data/filetest/data/nulls.txt',\n~ }"
[ 30s]
[ 30s] def closure_test_function(*args, **kwargs):
[ 30s] results = get_type(test_file).to_dict(include_date=False)
[ 30s]
[ 30s] if regen:
[ 30s] for key, value in results.items():
[ 30s] setattr(test, key, value)
[ 30s] test.dump()
[ 30s]
[ 30s] expected = test.to_dict(filter_empty=False, filter_extra=True)
[ 30s] passing = check_types_equal(expected, results)
[ 30s]
[ 30s] # this is done to display slightly eaier to handle error traces
[ 30s] if not passing:
[ 30s] expected['data file'] = 'file://' + data_file
[ 30s] expected['test_file'] = 'file://' + test_file
[ 30s] > assert dict(results) == dict(expected)
[ 30s] E AssertionError: assert {...}
[ 30s] E Differing items:
[ 30s] E {'filetype_file': 'ASCII text, with very long lines (10000), with no line terminators'} != {'filetype_file': 'ASCII text, with very long lines, with no line terminators'}
[ 30s] E Right contains 2 more items:
[ 30s] E {'data file': 'file:///home/abuild/rpmbuild/BUILD/typecode-30.0.0/tests/data/filetest/data/nulls.txt.yml',
[ 30s] E 'test_file': 'file:///home/abuild/rpmbuild/BUILD/typecode-30.0.0/tests/data/filetest/data/nulls.txt'}
[ 30s] tests/filetype_test_utils.py:216: AssertionError
[ 30s] _________ TestFileTypesDataDriven.test_filetest_doc_pdf_notpdf_pdf_94 __________
[ 30s]
[ 30s] args = (<test_types.TestFileTypesDataDriven object at 0xf5f7edd8>,), kwargs = {}
[ 30s] results = {'contains_text': True, 'elf_type': '', 'filetype_file': 'CSV text', 'filetype_pygment': '', ...}
[ 30s] expected = OrderedDict([('filetype_file', 'CSV text'), ('mimetype_file', 'application/csv'), ('mimetype_python', 'application/pdf...pdf.yml'), ('test_file', 'file:///home/abuild/rpmbuild/BUILD/typecode-30.0.0/tests/data/filetest/doc/pdf/notpdf.pdf')])
[ 30s] passing = False
[ 30s] @py_assert2 = {'contains_text': True, 'elf_type': '', 'filetype_file': 'CSV text', 'filetype_pygment': '', ...}
[ 30s] @py_assert7 = {'contains_text': True, 'data file': 'file:///home/abuild/rpmbuild/BUILD/typecode-30.0.0/tests/data/filetest/doc/pdf/notpdf.pdf.yml', 'elf_type': '', 'filetype_file': 'CSV text', ...}
[ 30s] @py_assert4 = False
[ 30s] @py_format9 = "{'contains_text': True,\\n 'elf_type': '',\\n 'filetype_file': 'CSV text',\\n 'filetype_pygment': '',\\n 'is_archive'...,\n~- 'test_file': 'file:///home/abuild/rpmbuild/BUILD/typecode-30.0.0/tests/data/filetest/doc/pdf/notpdf.pdf',\n~ }"
[ 30s] @py_format11 = "assert {'contains_text': True,\\n 'elf_type': '',\\n 'filetype_file': 'CSV text',\\n 'filetype_pygment': '',\\n 'is_a...,\n~- 'test_file': 'file:///home/abuild/rpmbuild/BUILD/typecode-30.0.0/tests/data/filetest/doc/pdf/notpdf.pdf',\n~ }"
[ 30s]
[ 30s] def closure_test_function(*args, **kwargs):
[ 30s] results = get_type(test_file).to_dict(include_date=False)
[ 30s]
[ 30s] if regen:
[ 30s] for key, value in results.items():
[ 30s] setattr(test, key, value)
[ 30s] test.dump()
[ 30s]
[ 30s] expected = test.to_dict(filter_empty=False, filter_extra=True)
[ 30s] passing = check_types_equal(expected, results)
[ 30s]
[ 30s] # this is done to display slightly eaier to handle error traces
[ 30s] if not passing:
[ 30s] expected['data file'] = 'file://' + data_file
[ 30s] expected['test_file'] = 'file://' + test_file
[ 30s] > assert dict(results) == dict(expected)
[ 30s] E AssertionError: assert {...}
[ 30s] E Differing items:
[ 30s] E {'mimetype_file': 'text/csv'} != {'mimetype_file': 'application/csv'}
[ 30s] E Right contains 2 more items:
[ 30s] E {'data file': 'file:///home/abuild/rpmbuild/BUILD/typecode-30.0.0/tests/data/filetest/doc/pdf/notpdf.pdf.yml',
[ 30s] E 'test_file': 'file:///home/abuild/rpmbuild/BUILD/typecode-30.0.0/tests/data/filetest/doc/pdf/notpdf.pdf'}
[ 30s] tests/filetype_test_utils.py:216: AssertionError
[ 30s] _______ TestFileTypesDataDriven.test_filetest_media_image_ascii_pgm_101 ________
[ 30s]
[ 30s] args = (<test_types.TestFileTypesDataDriven object at 0xf5f7ec58>,), kwargs = {}
[ 30s] results = {'contains_text': False, 'elf_type': '', 'filetype_file': 'Netpbm image data, size = 1 x 62, greymap, ASCII text', 'filetype_pygment': '', ...}
[ 30s] expected = OrderedDict([('filetype_file', 'Netpbm image data, size = 62 x 23, greymap, ASCII text'), ('mimetype_file', 'image/x-p....yml'), ('test_file', 'file:///home/abuild/rpmbuild/BUILD/typecode-30.0.0/tests/data/filetest/media/Image-ascii.pgm')])
[ 30s] passing = False
[ 30s] @py_assert2 = {'contains_text': False, 'elf_type': '', 'filetype_file': 'Netpbm image data, size = 1 x 62, greymap, ASCII text', 'filetype_pygment': '', ...}
[ 30s] @py_assert7 = {'contains_text': False, 'data file': 'file:///home/abuild/rpmbuild/BUILD/typecode-30.0.0/tests/data/filetest/media/Image-ascii.pgm.yml', 'elf_type': '', 'filetype_file': 'Netpbm image data, size = 62 x 23, greymap, ASCII text', ...}
[ 30s] @py_assert4 = False
[ 30s] @py_format9 = "{'contains_text': False,\\n 'elf_type': '',\\n 'filetype_file': 'Netpbm image data, size = 1 x 62, greymap, ASCII tex...~- 'test_file': 'file:///home/abuild/rpmbuild/BUILD/typecode-30.0.0/tests/data/filetest/media/Image-ascii.pgm',\n~ }"
[ 30s] @py_format11 = "assert {'contains_text': False,\\n 'elf_type': '',\\n 'filetype_file': 'Netpbm image data, size = 1 x 62, greymap, AS...~- 'test_file': 'file:///home/abuild/rpmbuild/BUILD/typecode-30.0.0/tests/data/filetest/media/Image-ascii.pgm',\n~ }"
[ 30s]
[ 30s] def closure_test_function(*args, **kwargs):
[ 30s] results = get_type(test_file).to_dict(include_date=False)
[ 30s]
[ 30s] if regen:
[ 30s] for key, value in results.items():
[ 30s] setattr(test, key, value)
[ 30s] test.dump()
[ 30s]
[ 30s] expected = test.to_dict(filter_empty=False, filter_extra=True)
[ 30s] passing = check_types_equal(expected, results)
[ 30s]
[ 30s] # this is done to display slightly eaier to handle error traces
[ 30s] if not passing:
[ 30s] expected['data file'] = 'file://' + data_file
[ 30s] expected['test_file'] = 'file://' + test_file
[ 30s] > assert dict(results) == dict(expected)
[ 30s] E AssertionError: assert {....}
[ 30s] E Differing items:
[ 30s] E {'filetype_file': 'Netpbm image data, size = 1 x 62, greymap, ASCII text'} != {'filetype_file': 'Netpbm image data, size = 62 x 23, greymap, ASCII text'}
[ 30s] E {'mimetype_file': 'image/x-portable-graymap'} != {'mimetype_file': 'image/x-portable-greymap'}
[ 30s] E Right contains 2 more items:
[ 30s] E {'data file': 'file:///home/abuild/rpmbuild/BUILD/typecode-30.0.0/tests/data/filetest/media/Image-ascii.pgm.yml',
[ 30s] E 'test_file': 'file:///home/abuild/rpmbuild/BUILD/typecode-30.0.0/tests/data/filetest/media/Image-ascii.pgm'}
[ 30s]
[ 30s] tests/filetype_test_utils.py:216: AssertionError
[ 30s] __________ TestFileTypesDataDriven.test_filetest_media_image_pgm_102 ___________
[ 30s]
[ 30s] args = (<test_types.TestFileTypesDataDriven object at 0xf5f7eb20>,), kwargs = {}
[ 30s] results = {'contains_text': False, 'elf_type': '', 'filetype_file': 'Netpbm image data, size = 1 x 62, rawbits, greymap', 'filetype_pygment': '', ...}
[ 30s] expected = OrderedDict([('filetype_file', 'Netpbm image data, size = 62 x 23, rawbits, greymap'), ('mimetype_file', 'image/x-port...ge.pgm.yml'), ('test_file', 'file:///home/abuild/rpmbuild/BUILD/typecode-30.0.0/tests/data/filetest/media/Image.pgm')])
[ 30s] passing = False
[ 30s] @py_assert2 = {'contains_text': False, 'elf_type': '', 'filetype_file': 'Netpbm image data, size = 1 x 62, rawbits, greymap', 'filetype_pygment': '', ...}
[ 30s] @py_assert7 = {'contains_text': False, 'data file': 'file:///home/abuild/rpmbuild/BUILD/typecode-30.0.0/tests/data/filetest/media/Image.pgm.yml', 'elf_type': '', 'filetype_file': 'Netpbm image data, size = 62 x 23, rawbits, greymap', ...}
[ 30s] @py_assert4 = False
[ 30s] @py_format9 = "{'contains_text': False,\\n 'elf_type': '',\\n 'filetype_file': 'Netpbm image data, size = 1 x 62, rawbits, greymap',...478,\n~- 'test_file': 'file:///home/abuild/rpmbuild/BUILD/typecode-30.0.0/tests/data/filetest/media/Image.pgm',\n~ }"
[ 30s] @py_format11 = "assert {'contains_text': False,\\n 'elf_type': '',\\n 'filetype_file': 'Netpbm image data, size = 1 x 62, rawbits, gr...478,\n~- 'test_file': 'file:///home/abuild/rpmbuild/BUILD/typecode-30.0.0/tests/data/filetest/media/Image.pgm',\n~ }"
[ 30s]
[ 30s] def closure_test_function(*args, **kwargs):
[ 30s] results = get_type(test_file).to_dict(include_date=False)
[ 30s]
[ 30s] if regen:
[ 30s] for key, value in results.items():
[ 30s] setattr(test, key, value)
[ 30s] test.dump()
[ 30s]
[ 30s] expected = test.to_dict(filter_empty=False, filter_extra=True)
[ 30s] passing = check_types_equal(expected, results)
[ 30s]
[ 30s] # this is done to display slightly eaier to handle error traces
[ 30s] if not passing:
[ 30s] expected['data file'] = 'file://' + data_file
[ 30s] expected['test_file'] = 'file://' + test_file
[ 30s] > assert dict(results) == dict(expected)
[ 30s] E AssertionError: assert {...}
[ 30s] E Common items:
[ 30s] E Differing items:
[ 30s] E {'filetype_file': 'Netpbm image data, size = 1 x 62, rawbits, greymap'} != {'filetype_file': 'Netpbm image data, size = 62 x 23, rawbits, greymap'}
[ 30s] E Right contains 2 more items:
[ 30s] E {'data file': 'file:///home/abuild/rpmbuild/BUILD/typecode-30.0.0/tests/data/filetest/media/Image.pgm.yml',
[ 30s] E 'test_file': 'file:///home/abuild/rpmbuild/BUILD/typecode-30.0.0/tests/data/filetest/media/Image.pgm'}
[ 30s]
[ 30s] tests/filetype_test_utils.py:216: AssertionError
[ 30s] __________ TestFileTypesDataDriven.test_filetest_media_image1_pbm_112 __________
[ 30s]
[ 30s] args = (<test_types.TestFileTypesDataDriven object at 0xf5f7d3e8>,), kwargs = {}
[ 30s] results = {'contains_text': False, 'elf_type': '', 'filetype_file': 'Netpbm image data, size = 5 x 1, bitmap Created by Paint Shop Pro 5, ASCII text', 'filetype_pygment': '', ...}
[ 30s] expected = OrderedDict([('filetype_file', 'Netpbm image data, size = 1 x 1, bitmap, ASCII text'), ('mimetype_file', 'image/x-port...1.pbm.yml'), ('test_file', 'file:///home/abuild/rpmbuild/BUILD/typecode-30.0.0/tests/data/filetest/media/Image1.pbm')])
[ 30s] passing = False
[ 30s] @py_assert2 = {'contains_text': False, 'elf_type': '', 'filetype_file': 'Netpbm image data, size = 5 x 1, bitmap Created by Paint Shop Pro 5, ASCII text', 'filetype_pygment': '', ...}
[ 30s] @py_assert7 = {'contains_text': False, 'data file': 'file:///home/abuild/rpmbuild/BUILD/typecode-30.0.0/tests/data/filetest/media/Image1.pbm.yml', 'elf_type': '', 'filetype_file': 'Netpbm image data, size = 1 x 1, bitmap, ASCII text', ...}
[ 30s] @py_assert4 = False
[ 30s] @py_format9 = "{'contains_text': False,\\n 'elf_type': '',\\n 'filetype_file': 'Netpbm image data, size = 5 x 1, bitmap Created by P...40,\n~- 'test_file': 'file:///home/abuild/rpmbuild/BUILD/typecode-30.0.0/tests/data/filetest/media/Image1.pbm',\n~ }"
[ 30s] @py_format11 = "assert {'contains_text': False,\\n 'elf_type': '',\\n 'filetype_file': 'Netpbm image data, size = 5 x 1, bitmap Creat...40,\n~- 'test_file': 'file:///home/abuild/rpmbuild/BUILD/typecode-30.0.0/tests/data/filetest/media/Image1.pbm',\n~ }"
[ 30s]
[ 30s] def closure_test_function(*args, **kwargs):
[ 30s] results = get_type(test_file).to_dict(include_date=False)
[ 30s]
[ 30s] if regen:
[ 30s] for key, value in results.items():
[ 30s] setattr(test, key, value)
[ 30s] test.dump()
[ 30s]
[ 30s] expected = test.to_dict(filter_empty=False, filter_extra=True)
[ 30s] passing = check_types_equal(expected, results)
[ 30s]
[ 30s] # this is done to display slightly eaier to handle error traces
[ 30s] if not passing:
[ 30s] expected['data file'] = 'file://' + data_file
[ 30s] expected['test_file'] = 'file://' + test_file
[ 30s] > assert dict(results) == dict(expected)
[ 30s] E AssertionError: assert {...}
[ 30s] E Differing items:
[ 30s] E {'filetype_file': 'Netpbm image data, size = 5 x 1, bitmap Created by Paint Shop Pro 5, ASCII text'} != {'filetype_file': 'Netpbm image data, size = 1 x 1, bitmap, ASCII text'}
[ 30s] E Right contains 2 more items:
[ 30s] E {'data file': 'file:///home/abuild/rpmbuild/BUILD/typecode-30.0.0/tests/data/filetest/media/Image1.pbm.yml',
[ 30s] E 'test_file': 'file:///home/abuild/rpmbuild/BUILD/typecode-30.0.0/tests/data/filetest/media/Image1.pbm'}
[ 30s] tests/filetype_test_utils.py:216: AssertionError
[ 30s] __________ TestFileTypesDataDriven.test_filetest_media_image1_ppm_114 __________
[ 30s]
[ 30s] args = (<test_types.TestFileTypesDataDriven object at 0xf5f7d238>,), kwargs = {}
[ 30s] results = {'contains_text': False, 'elf_type': '', 'filetype_file': 'Netpbm image data, size = 5 x 1, pixmap, ASCII text', 'filetype_pygment': '', ...}
[ 30s] expected = OrderedDict([('filetype_file', 'Netpbm image data, size = 1 x 1, pixmap, ASCII text'), ('mimetype_file', 'image/x-port...1.ppm.yml'), ('test_file', 'file:///home/abuild/rpmbuild/BUILD/typecode-30.0.0/tests/data/filetest/media/Image1.ppm')])
[ 30s] passing = False
[ 30s] @py_assert2 = {'contains_text': False, 'elf_type': '', 'filetype_file': 'Netpbm image data, size = 5 x 1, pixmap, ASCII text', 'filetype_pygment': '', ...}
[ 30s] @py_assert7 = {'contains_text': False, 'data file': 'file:///home/abuild/rpmbuild/BUILD/typecode-30.0.0/tests/data/filetest/media/Image1.ppm.yml', 'elf_type': '', 'filetype_file': 'Netpbm image data, size = 1 x 1, pixmap, ASCII text', ...}
[ 30s] @py_assert4 = False
[ 30s] @py_format9 = "{'contains_text': False,\\n 'elf_type': '',\\n 'filetype_file': 'Netpbm image data, size = 5 x 1, pixmap, ASCII text'...54,\n~- 'test_file': 'file:///home/abuild/rpmbuild/BUILD/typecode-30.0.0/tests/data/filetest/media/Image1.ppm',\n~ }"
[ 30s] @py_format11 = "assert {'contains_text': False,\\n 'elf_type': '',\\n 'filetype_file': 'Netpbm image data, size = 5 x 1, pixmap, ASCI...54,\n~- 'test_file': 'file:///home/abuild/rpmbuild/BUILD/typecode-30.0.0/tests/data/filetest/media/Image1.ppm',\n~ }"
[ 30s]
[ 30s] def closure_test_function(*args, **kwargs):
[ 30s] results = get_type(test_file).to_dict(include_date=False)
[ 30s]
[ 30s] if regen:
[ 30s] for key, value in results.items():
[ 30s] setattr(test, key, value)
[ 30s] test.dump()
[ 30s]
[ 30s] expected = test.to_dict(filter_empty=False, filter_extra=True)
[ 30s] passing = check_types_equal(expected, results)
[ 30s]
[ 30s] # this is done to display slightly eaier to handle error traces
[ 30s] if not passing:
[ 30s] expected['data file'] = 'file://' + data_file
[ 30s] expected['test_file'] = 'file://' + test_file
[ 30s] > assert dict(results) == dict(expected)
[ 30s] E AssertionError: assert {...}
[ 30s] E Differing items:
[ 30s] E {'filetype_file': 'Netpbm image data, size = 5 x 1, pixmap, ASCII text'} != {'filetype_file': 'Netpbm image data, size = 1 x 1, pixmap, ASCII text'}
[ 30s] E Right contains 2 more items:
[ 30s] E {'data file': 'file:///home/abuild/rpmbuild/BUILD/typecode-30.0.0/tests/data/filetest/media/Image1.ppm.yml',
[ 30s] E 'test_file': 'file:///home/abuild/rpmbuild/BUILD/typecode-30.0.0/tests/data/filetest/media/Image1.ppm'}
[ 30s] tests/filetype_test_utils.py:216: AssertionError
[ 30s] __________ TestFileTypesDataDriven.test_filetest_media_image1_tga_118 __________
[ 30s]
[ 30s] args = (<test_types.TestFileTypesDataDriven object at 0xf5f7d5e0>,), kwargs = {}
[ 30s] results = {'contains_text': False, 'elf_type': '', 'filetype_file': 'Targa image data - RGB - RLE 1 x 1 x 24 - author " " - comment " " 23-2-2010 10:24:54 - job " " - Paint Shop Pro 12.80', 'filetype_pygment': '', ...}
[ 30s] expected = OrderedDict([('filetype_file', 'data'), ('mimetype_file', 'application/octet-stream'), ('mimetype_python', ''), ('file...1.tga.yml'), ('test_file', 'file:///home/abuild/rpmbuild/BUILD/typecode-30.0.0/tests/data/filetest/media/Image1.tga')])
[ 30s] passing = False
[ 30s] @py_assert2 = {'contains_text': False, 'elf_type': '', 'filetype_file': 'Targa image data - RGB - RLE 1 x 1 x 24 - author " " - comment " " 23-2-2010 10:24:54 - job " " - Paint Shop Pro 12.80', 'filetype_pygment': '', ...}
[ 30s] @py_assert7 = {'contains_text': False, 'data file': 'file:///home/abuild/rpmbuild/BUILD/typecode-30.0.0/tests/data/filetest/media/Image1.tga.yml', 'elf_type': '', 'filetype_file': 'data', ...}
[ 30s] @py_assert4 = False
[ 30s] @py_format9 = '{\'contains_text\': False,\\n \'elf_type\': \'\',\\n \'filetype_file\': \'Targa image data - RGB - RLE 1 x 1 x 24 - a...n~- \'test_file\': \'file:///home/abuild/rpmbuild/BUILD/typecode-30.0.0/tests/data/filetest/media/Image1.tga\',\n~ }'
[ 30s] @py_format11 = "assert {'contains_text': False,\\n 'elf_type': '',\\n 'filetype_file': 'Targa image data - RGB - RLE 1 x 1 x 24 - aut...43,\n~- 'test_file': 'file:///home/abuild/rpmbuild/BUILD/typecode-30.0.0/tests/data/filetest/media/Image1.tga',\n~ }"
[ 30s]
[ 30s] def closure_test_function(*args, **kwargs):
[ 30s] results = get_type(test_file).to_dict(include_date=False)
[ 30s]
[ 30s] if regen:
[ 30s] for key, value in results.items():
[ 30s] setattr(test, key, value)
[ 30s] test.dump()
[ 30s]
[ 30s] expected = test.to_dict(filter_empty=False, filter_extra=True)
[ 30s] passing = check_types_equal(expected, results)
[ 30s]
[ 30s] # this is done to display slightly eaier to handle error traces
[ 30s] if not passing:
[ 30s] expected['data file'] = 'file://' + data_file
[ 30s] expected['test_file'] = 'file://' + test_file
[ 30s] > assert dict(results) == dict(expected)
[ 30s] E assert {...}
[ 30s] E Differing items:
[ 30s] E {'filetype_file': 'Targa image data - RGB - RLE 1 x 1 x 24 - author " " - comment " " 23-2-2010 10:24:54 - job " " - Paint Shop Pro 12.80'} != {'filetype_file': 'data'}
[ 30s] E {'mimetype_file': 'image/x-tga'} != {'mimetype_file': 'application/octet-stream'}
[ 30s] E {'is_data': False} != {'is_data': True}
[ 30s] E Right contains 2 more items:
[ 30s] E {'data file': 'file:///home/abuild/rpmbuild/BUILD/typecode-30.0.0/tests/data/filetest/media/Image1.tga.yml',
[ 30s] E 'test_file': 'file:///home/abuild/rpmbuild/BUILD/typecode-30.0.0/tests/data/filetest/media/Image1.tga'}
[ 30s] tests/filetype_test_utils.py:216: AssertionError
[ 30s] __________ TestFileTypesDataDriven.test_filetest_media_image1_tif_119 __________
[ 30s]
[ 30s] args = (<test_types.TestFileTypesDataDriven object at 0xf5f7d550>,), kwargs = {}
[ 30s] results = {'contains_text': False, 'elf_type': '', 'filetype_file': 'TIFF image data, little-endian, direntries=14, height=1, bps=1, compression=LZW, PhotometricInterpretation=BlackIsZero, width=1', 'filetype_pygment': '', ...}
[ 30s] expected = OrderedDict([('filetype_file', 'TIFF image data, little-endian, direntries=14, height=1, bps=1, compression=LZW, Photo...1.tif.yml'), ('test_file', 'file:///home/abuild/rpmbuild/BUILD/typecode-30.0.0/tests/data/filetest/media/Image1.tif')])
[ 30s] passing = False
[ 30s] @py_assert2 = {'contains_text': False, 'elf_type': '', 'filetype_file': 'TIFF image data, little-endian, direntries=14, height=1, bps=1, compression=LZW, PhotometricInterpretation=BlackIsZero, width=1', 'filetype_pygment': '', ...}
[ 30s] @py_assert7 = {'contains_text': False, 'data file': 'file:///home/abuild/rpmbuild/BUILD/typecode-30.0.0/tests/data/filetest/media/Im...a, little-endian, direntries=14, height=1, bps=1, compression=LZW, PhotometricIntepretation=BlackIsZero, width=1', ...}
[ 30s] @py_assert4 = False
[ 30s] @py_format9 = "{'contains_text': False,\\n 'elf_type': '',\\n 'filetype_file': 'TIFF image data, little-endian, direntries=14, heigh...22,\n~- 'test_file': 'file:///home/abuild/rpmbuild/BUILD/typecode-30.0.0/tests/data/filetest/media/Image1.tif',\n~ }"
[ 30s] @py_format11 = "assert {'contains_text': False,\\n 'elf_type': '',\\n 'filetype_file': 'TIFF image data, little-endian, direntries=14...22,\n~- 'test_file': 'file:///home/abuild/rpmbuild/BUILD/typecode-30.0.0/tests/data/filetest/media/Image1.tif',\n~ }"
[ 30s]
[ 30s] def closure_test_function(*args, **kwargs):
[ 30s] results = get_type(test_file).to_dict(include_date=False)
[ 30s]
[ 30s] if regen:
[ 30s] for key, value in results.items():
[ 30s] setattr(test, key, value)
[ 30s] test.dump()
[ 30s]
[ 30s] expected = test.to_dict(filter_empty=False, filter_extra=True)
[ 30s] passing = check_types_equal(expected, results)
[ 30s]
[ 30s] # this is done to display slightly eaier to handle error traces
[ 30s] if not passing:
[ 30s] expected['data file'] = 'file://' + data_file
[ 30s] expected['test_file'] = 'file://' + test_file
[ 30s] > assert dict(results) == dict(expected)
[ 30s] E AssertionError: assert {...}
[ 30s] E Differing items:
[ 30s] E {'filetype_file': 'TIFF image data, little-endian, direntries=14, height=1, bps=1, compression=LZW, PhotometricInterpretation=BlackIsZero, width=1'} != {'filetype_file': 'TIFF image data, little-endian, direntries=14, height=1, bps=1, compression=LZW, PhotometricIntepretation=BlackIsZero, width=1'}
[ 30s] E Right contains 2 more items:
[ 30s] E {'data file': 'file:///home/abuild/rpmbuild/BUILD/typecode-30.0.0/tests/data/filetest/media/Image1.tif.yml',
[ 30s] E 'test_file': 'file:///home/abuild/rpmbuild/BUILD/typecode-30.0.0/tests/data/filetest/media/Image1.tif'}
[ 30s]
[ 30s] tests/filetype_test_utils.py:216: AssertionError
[ 30s] __________ TestFileTypesDataDriven.test_filetest_media_movie_wmv_121 ___________
[ 30s]
[ 30s] args = (<test_types.TestFileTypesDataDriven object at 0xf5f7e9a0>,), kwargs = {}
[ 30s] results = {'contains_text': False, 'elf_type': '', 'filetype_file': 'Microsoft ASF ASF_Extended_Content_Description_Object', 'filetype_pygment': '', ...}
[ 30s] expected = OrderedDict([('filetype_file', 'Microsoft ASF ASF_Extended_Content_Description_Object, Audio Media (Codec Id 353, Numb...ie.wmv.yml'), ('test_file', 'file:///home/abuild/rpmbuild/BUILD/typecode-30.0.0/tests/data/filetest/media/Movie.wmv')])
[ 30s] passing = False
[ 30s] @py_assert2 = {'contains_text': False, 'elf_type': '', 'filetype_file': 'Microsoft ASF ASF_Extended_Content_Description_Object', 'filetype_pygment': '', ...}
[ 30s] @py_assert7 = {'contains_text': False, 'data file': 'file:///home/abuild/rpmbuild/BUILD/typecode-30.0.0/tests/data/filetest/media/Mo...20, Bits Per Pixel Count 24, Error correction type ASF_No_Error_Correction) ASF_Stream_Bitrate_Properties_Object', ...}
[ 30s] @py_assert4 = False
[ 30s] @py_format9 = "{'contains_text': False,\\n 'elf_type': '',\\n 'filetype_file': 'Microsoft ASF ASF_Extended_Content_Description_Objec...053,\n~- 'test_file': 'file:///home/abuild/rpmbuild/BUILD/typecode-30.0.0/tests/data/filetest/media/Movie.wmv',\n~ }"
[ 30s] @py_format11 = "assert {'contains_text': False,\\n 'elf_type': '',\\n 'filetype_file': 'Microsoft ASF ASF_Extended_Content_Descriptio...053,\n~- 'test_file': 'file:///home/abuild/rpmbuild/BUILD/typecode-30.0.0/tests/data/filetest/media/Movie.wmv',\n~ }"
[ 30s]
[ 30s] def closure_test_function(*args, **kwargs):
[ 30s] results = get_type(test_file).to_dict(include_date=False)
[ 30s]
[ 30s] if regen:
[ 30s] for key, value in results.items():
[ 30s] setattr(test, key, value)
[ 30s] test.dump()
[ 30s]
[ 30s] expected = test.to_dict(filter_empty=False, filter_extra=True)
[ 30s] passing = check_types_equal(expected, results)
[ 30s]
[ 30s] # this is done to display slightly eaier to handle error traces
[ 30s] if not passing:
[ 30s] expected['data file'] = 'file://' + data_file
[ 30s] expected['test_file'] = 'file://' + test_file
[ 30s] > assert dict(results) == dict(expected)
[ 30s] E AssertionError: assert {...}
[ 30s] E Differing items:
[ 30s] E {'filetype_file': 'Microsoft ASF ASF_Extended_Content_Description_Object'} != {'filetype_file': 'Microsoft ASF ASF_Extended_Content_Description_Object, Audio Media (Codec Id 353, Number of channel...ght 120, Bits Per Pixel Count 24, Error correction type ASF_No_Error_Correction) ASF_Stream_Bitrate_Properties_Object'}
[ 30s] E Right contains 2 more items:
[ 30s] E {'data file': 'file:///home/abuild/rpmbuild/BUILD/typecode-30.0.0/tests/data/filetest/media/Movie.wmv.yml',
[ 30s] E 'test_file': 'file:///home/abuild/rpmbuild/BUILD/typecode-30.0.0/tests/data/filetest/media/Movie.wmv'}
[ 30s] tests/filetype_test_utils.py:216: AssertionError
[ 30s] ________ TestFileTypesDataDriven.test_filetest_media_movie_0001_wmv_122 ________
[ 30s]
[ 30s] args = (<test_types.TestFileTypesDataDriven object at 0xf5f7ec88>,), kwargs = {}
[ 30s] results = {'contains_text': False, 'elf_type': '', 'filetype_file': 'Microsoft ASF ASF_Extended_Content_Description_Object', 'filetype_pygment': '', ...}
[ 30s] expected = OrderedDict([('filetype_file', 'Microsoft ASF ASF_Extended_Content_Description_Object, Audio Media (Codec Id 353, Numb...v.yml'), ('test_file', 'file:///home/abuild/rpmbuild/BUILD/typecode-30.0.0/tests/data/filetest/media/Movie_0001.wmv')])
[ 30s] passing = False
[ 30s] @py_assert2 = {'contains_text': False, 'elf_type': '', 'filetype_file': 'Microsoft ASF ASF_Extended_Content_Description_Object', 'filetype_pygment': '', ...}
[ 30s] @py_assert7 = {'contains_text': False, 'data file': 'file:///home/abuild/rpmbuild/BUILD/typecode-30.0.0/tests/data/filetest/media/Mo... correction type ASF_No_Error_Correction) ASF_Stream_Bitrate_Properties_Object ASF_Index_Object ASF_Index_Object', ...}
[ 30s] @py_assert4 = False
[ 30s] @py_format9 = "{'contains_text': False,\\n 'elf_type': '',\\n 'filetype_file': 'Microsoft ASF ASF_Extended_Content_Description_Objec...n~- 'test_file': 'file:///home/abuild/rpmbuild/BUILD/typecode-30.0.0/tests/data/filetest/media/Movie_0001.wmv',\n~ }"
[ 30s] @py_format11 = "assert {'contains_text': False,\\n 'elf_type': '',\\n 'filetype_file': 'Microsoft ASF ASF_Extended_Content_Descriptio...n~- 'test_file': 'file:///home/abuild/rpmbuild/BUILD/typecode-30.0.0/tests/data/filetest/media/Movie_0001.wmv',\n~ }"
[ 30s]
[ 30s] def closure_test_function(*args, **kwargs):
[ 30s] results = get_type(test_file).to_dict(include_date=False)
[ 30s]
[ 30s] if regen:
[ 30s] for key, value in results.items():
[ 30s] setattr(test, key, value)
[ 30s] test.dump()
[ 30s]
[ 30s] expected = test.to_dict(filter_empty=False, filter_extra=True)
[ 30s] passing = check_types_equal(expected, results)
[ 30s]
[ 30s] # this is done to display slightly eaier to handle error traces
[ 30s] if not passing:
[ 30s] expected['data file'] = 'file://' + data_file
[ 30s] expected['test_file'] = 'file://' + test_file
[ 30s] > assert dict(results) == dict(expected)
[ 30s] E AssertionError: assert {...}
[ 30s] E Differing items:
[ 30s] E {'filetype_file': 'Microsoft ASF ASF_Extended_Content_Description_Object'} != {'filetype_file': 'Microsoft ASF ASF_Extended_Content_Description_Object, Audio Media (Codec Id 353, Number of channel...Error correction type ASF_No_Error_Correction) ASF_Stream_Bitrate_Properties_Object ASF_Index_Object ASF_Index_Object'}
[ 30s] E Right contains 2 more items:
[ 30s] E {'data file': 'file:///home/abuild/rpmbuild/BUILD/typecode-30.0.0/tests/data/filetest/media/Movie_0001.wmv.yml',
[ 30s] E 'test_file': 'file:///home/abuild/rpmbuild/BUILD/typecode-30.0.0/tests/data/filetest/media/Movie_0001.wmv'}
[ 30s]
[ 30s] tests/filetype_test_utils.py:216: AssertionError
[ 30s] ________ TestFileTypesDataDriven.test_filetest_media_movie_0002_wmv_123 ________
[ 30s]
[ 30s] args = (<test_types.TestFileTypesDataDriven object at 0xf5f7d658>,), kwargs = {}
[ 30s] results = {'contains_text': False, 'elf_type': '', 'filetype_file': 'Microsoft ASF ASF_Extended_Content_Description_Object', 'filetype_pygment': '', ...}
[ 30s] expected = OrderedDict([('filetype_file', 'Microsoft ASF ASF_Extended_Content_Description_Object, Audio Media (Codec Id 353, Numb...v.yml'), ('test_file', 'file:///home/abuild/rpmbuild/BUILD/typecode-30.0.0/tests/data/filetest/media/Movie_0002.wmv')])
[ 30s] passing = False
[ 30s] @py_assert2 = {'contains_text': False, 'elf_type': '', 'filetype_file': 'Microsoft ASF ASF_Extended_Content_Description_Object', 'filetype_pygment': '', ...}
[ 30s] @py_assert7 = {'contains_text': False, 'data file': 'file:///home/abuild/rpmbuild/BUILD/typecode-30.0.0/tests/data/filetest/media/Mo...60, Bits Per Pixel Count 24, Error correction type ASF_No_Error_Correction) ASF_Stream_Bitrate_Properties_Object', ...}
[ 30s] @py_assert4 = False
[ 30s] @py_format9 = "{'contains_text': False,\\n 'elf_type': '',\\n 'filetype_file': 'Microsoft ASF ASF_Extended_Content_Description_Objec...n~- 'test_file': 'file:///home/abuild/rpmbuild/BUILD/typecode-30.0.0/tests/data/filetest/media/Movie_0002.wmv',\n~ }"
[ 30s] @py_format11 = "assert {'contains_text': False,\\n 'elf_type': '',\\n 'filetype_file': 'Microsoft ASF ASF_Extended_Content_Descriptio...n~- 'test_file': 'file:///home/abuild/rpmbuild/BUILD/typecode-30.0.0/tests/data/filetest/media/Movie_0002.wmv',\n~ }"
[ 30s]
[ 30s] def closure_test_function(*args, **kwargs):
[ 30s] results = get_type(test_file).to_dict(include_date=False)
[ 30s]
[ 30s] if regen:
[ 30s] for key, value in results.items():
[ 30s] setattr(test, key, value)
[ 30s] test.dump()
[ 30s]
[ 30s] expected = test.to_dict(filter_empty=False, filter_extra=True)
[ 30s] passing = check_types_equal(expected, results)
[ 30s]
[ 30s] # this is done to display slightly eaier to handle error traces
[ 30s] if not passing:
[ 30s] expected['data file'] = 'file://' + data_file
[ 30s] expected['test_file'] = 'file://' + test_file
[ 30s] > assert dict(results) == dict(expected)
[ 30s] E AssertionError: assert {...}
[ 30s] E Differing items:
[ 30s] E {'filetype_file': 'Microsoft ASF ASF_Extended_Content_Description_Object'} != {'filetype_file': 'Microsoft ASF ASF_Extended_Content_Description_Object, Audio Media (Codec Id 353, Number of channel...ght 160, Bits Per Pixel Count 24, Error correction type ASF_No_Error_Correction) ASF_Stream_Bitrate_Properties_Object'}
[ 30s] E Right contains 2 more items:
[ 30s] E {'data file': 'file:///home/abuild/rpmbuild/BUILD/typecode-30.0.0/tests/data/filetest/media/Movie_0002.wmv.yml',
[ 30s] E 'test_file': 'file:///home/abuild/rpmbuild/BUILD/typecode-30.0.0/tests/data/filetest/media/Movie_0002.wmv'}
[ 30s] tests/filetype_test_utils.py:216: AssertionError
[ 30s] ____________ TestFileTypesDataDriven.test_filetest_media_a_avi_129 _____________
[ 30s]
[ 30s] args = (<test_types.TestFileTypesDataDriven object at 0xf5f7d700>,), kwargs = {}
[ 30s] results = {'contains_text': False, 'elf_type': '', 'filetype_file': 'Microsoft ASF', 'filetype_pygment': '', ...}
[ 30s] expected = OrderedDict([('filetype_file', 'Microsoft ASF, Video Media (Encoded Image Width 1680, Encoded Image Height 1050, Image...edia/a.avi.yml'), ('test_file', 'file:///home/abuild/rpmbuild/BUILD/typecode-30.0.0/tests/data/filetest/media/a.avi')])
[ 30s] passing = False
[ 30s] @py_assert2 = {'contains_text': False, 'elf_type': '', 'filetype_file': 'Microsoft ASF', 'filetype_pygment': '', ...}
[ 30s] @py_assert7 = {'contains_text': False, 'data file': 'file:///home/abuild/rpmbuild/BUILD/typecode-30.0.0/tests/data/filetest/media/a....50, Image Width 1680, Image Height 1050, Bits Per Pixel Count 24, Error correction type ASF_No_Error_Correction)', ...}
[ 30s] @py_assert4 = False
[ 30s] @py_format9 = "{'contains_text': False,\\n 'elf_type': '',\\n 'filetype_file': 'Microsoft ASF',\\n 'filetype_pygment': '',\\n 'is_ar... 156277,\n~- 'test_file': 'file:///home/abuild/rpmbuild/BUILD/typecode-30.0.0/tests/data/filetest/media/a.avi',\n~ }"
[ 30s] @py_format11 = "assert {'contains_text': False,\\n 'elf_type': '',\\n 'filetype_file': 'Microsoft ASF',\\n 'filetype_pygment': '',\\n... 156277,\n~- 'test_file': 'file:///home/abuild/rpmbuild/BUILD/typecode-30.0.0/tests/data/filetest/media/a.avi',\n~ }"
[ 30s]
[ 30s] def closure_test_function(*args, **kwargs):
[ 30s] results = get_type(test_file).to_dict(include_date=False)
[ 30s]
[ 30s] if regen:
[ 30s] for key, value in results.items():
[ 30s] setattr(test, key, value)
[ 30s] test.dump()
[ 30s]
[ 30s] expected = test.to_dict(filter_empty=False, filter_extra=True)
[ 30s] passing = check_types_equal(expected, results)
[ 30s]
[ 30s] # this is done to display slightly eaier to handle error traces
[ 30s] if not passing:
[ 30s] expected['data file'] = 'file://' + data_file
[ 30s] expected['test_file'] = 'file://' + test_file
[ 30s] > assert dict(results) == dict(expected)
[ 30s] E AssertionError: assert {...}
[ 30s] E Differing items:
[ 30s] E {'filetype_file': 'Microsoft ASF'} != {'filetype_file': 'Microsoft ASF, Video Media (Encoded Image Width 1680, Encoded Image Height 1050, Image Width 1680, Image Height 1050, Bits Per Pixel Count 24, Error correction type ASF_No_Error_Correction)'}
[ 30s] E Right contains 2 more items:
[ 30s] E {'data file': 'file:///home/abuild/rpmbuild/BUILD/typecode-30.0.0/tests/data/filetest/media/a.avi.yml',
[ 30s] E 'test_file': 'file:///home/abuild/rpmbuild/BUILD/typecode-30.0.0/tests/data/filetest/media/a.avi'}
[ 30s] tests/filetype_test_utils.py:216: AssertionError
[ 30s] ____________ TestFileTypesDataDriven.test_filetest_media_a4_mp4_138 ____________
[ 30s]
[ 30s] args = (<test_types.TestFileTypesDataDriven object at 0xf5f7dbc8>,), kwargs = {}
[ 30s] results = {'contains_text': False, 'elf_type': '', 'filetype_file': 'ISO Media, MP4 Base Media v1 [ISO 14496-12:2003]', 'filetype_pygment': '', ...}
[ 30s] expected = OrderedDict([('filetype_file', 'ISO Media, MP4 Base Media v1 [IS0 14496-12:2003]'), ('mimetype_file', 'video/mp4'), ('...ia/a4.mp4.yml'), ('test_file', 'file:///home/abuild/rpmbuild/BUILD/typecode-30.0.0/tests/data/filetest/media/a4.mp4')])
[ 30s] passing = False
[ 30s] @py_assert2 = {'contains_text': False, 'elf_type': '', 'filetype_file': 'ISO Media, MP4 Base Media v1 [ISO 14496-12:2003]', 'filetype_pygment': '', ...}
[ 30s] @py_assert7 = {'contains_text': False, 'data file': 'file:///home/abuild/rpmbuild/BUILD/typecode-30.0.0/tests/data/filetest/media/a4.mp4.yml', 'elf_type': '', 'filetype_file': 'ISO Media, MP4 Base Media v1 [IS0 14496-12:2003]', ...}
[ 30s] @py_assert4 = False
[ 30s] @py_format9 = "{'contains_text': False,\\n 'elf_type': '',\\n 'filetype_file': 'ISO Media, MP4 Base Media v1 [ISO 14496-12:2003]',\\...': 196,\n~- 'test_file': 'file:///home/abuild/rpmbuild/BUILD/typecode-30.0.0/tests/data/filetest/media/a4.mp4',\n~ }"
[ 30s] @py_format11 = "assert {'contains_text': False,\\n 'elf_type': '',\\n 'filetype_file': 'ISO Media, MP4 Base Media v1 [ISO 14496-12:20...': 196,\n~- 'test_file': 'file:///home/abuild/rpmbuild/BUILD/typecode-30.0.0/tests/data/filetest/media/a4.mp4',\n~ }"
[ 30s]
[ 30s] def closure_test_function(*args, **kwargs):
[ 30s] results = get_type(test_file).to_dict(include_date=False)
[ 30s]
[ 30s] if regen:
[ 30s] for key, value in results.items():
[ 30s] setattr(test, key, value)
[ 30s] test.dump()
[ 30s]
[ 30s] expected = test.to_dict(filter_empty=False, filter_extra=True)
[ 30s] passing = check_types_equal(expected, results)
[ 30s]
[ 30s] # this is done to display slightly eaier to handle error traces
[ 30s] if not passing:
[ 30s] expected['data file'] = 'file://' + data_file
[ 30s] expected['test_file'] = 'file://' + test_file
[ 30s] > assert dict(results) == dict(expected)
[ 30s] E AssertionError: assert {...}
[ 30s] E Differing items:
[ 30s] E {'filetype_file': 'ISO Media, MP4 Base Media v1 [ISO 14496-12:2003]'} != {'filetype_file': 'ISO Media, MP4 Base Media v1 [IS0 14496-12:2003]'}
[ 30s] E Right contains 2 more items:
[ 30s] E {'data file': 'file:///home/abuild/rpmbuild/BUILD/typecode-30.0.0/tests/data/filetest/media/a4.mp4.yml',
[ 30s] E 'test_file': 'file:///home/abuild/rpmbuild/BUILD/typecode-30.0.0/tests/data/filetest/media/a4.mp4'}
[ 30s] tests/filetype_test_utils.py:216: AssertionError
[ 30s] ____________ TestFileTypesDataDriven.test_filetest_media_a4_mpg_139 ____________
[ 30s]
same as above
[ 31s] tests/filetype_test_utils.py:216: AssertionError
[ 31s] _________ TestFileTypesDataDriven.test_filetest_media_mov_wvm_wmv_141 __________
[ 31s]
[ 31s] args = (<test_types.TestFileTypesDataDriven object at 0xf5f7eee0>,), kwargs = {}
[ 31s] results = {'contains_text': False, 'elf_type': '', 'filetype_file': 'Microsoft ASF ASF_Extended_Content_Description_Object', 'filetype_pygment': '', ...}
[ 31s] expected = OrderedDict([('filetype_file', 'Microsoft ASF ASF_Extended_Content_Description_Object, Audio Media (Codec Id 353, Numb....wmv.yml'), ('test_file', 'file:///home/abuild/rpmbuild/BUILD/typecode-30.0.0/tests/data/filetest/media/mov.wvm.wmv')])
[ 31s] passing = False
[ 31s] @py_assert2 = {'contains_text': False, 'elf_type': '', 'filetype_file': 'Microsoft ASF ASF_Extended_Content_Description_Object', 'filetype_pygment': '', ...}
[ 31s] @py_assert7 = {'contains_text': False, 'data file': 'file:///home/abuild/rpmbuild/BUILD/typecode-30.0.0/tests/data/filetest/media/mo...20, Bits Per Pixel Count 24, Error correction type ASF_No_Error_Correction) ASF_Stream_Bitrate_Properties_Object', ...}
[ 31s] @py_assert4 = False
[ 31s] @py_format9 = "{'contains_text': False,\\n 'elf_type': '',\\n 'filetype_file': 'Microsoft ASF ASF_Extended_Content_Description_Objec...6,\n~- 'test_file': 'file:///home/abuild/rpmbuild/BUILD/typecode-30.0.0/tests/data/filetest/media/mov.wvm.wmv',\n~ }"
[ 31s] @py_format11 = "assert {'contains_text': False,\\n 'elf_type': '',\\n 'filetype_file': 'Microsoft ASF ASF_Extended_Content_Descriptio...6,\n~- 'test_file': 'file:///home/abuild/rpmbuild/BUILD/typecode-30.0.0/tests/data/filetest/media/mov.wvm.wmv',\n~ }"
[ 31s]
[ 31s] def closure_test_function(*args, **kwargs):
[ 31s] results = get_type(test_file).to_dict(include_date=False)
[ 31s]
[ 31s] if regen:
[ 31s] for key, value in results.items():
[ 31s] setattr(test, key, value)
[ 31s] test.dump()
[ 31s]
[ 31s] expected = test.to_dict(filter_empty=False, filter_extra=True)
[ 31s] passing = check_types_equal(expected, results)
[ 31s]
[ 31s] # this is done to display slightly eaier to handle error traces
[ 31s] if not passing:
[ 31s] expected['data file'] = 'file://' + data_file
[ 31s] expected['test_file'] = 'file://' + test_file
[ 31s] > assert dict(results) == dict(expected)
[ 31s] E AssertionError: assert {...}
[ 31s] E Differing items:
[ 31s] E {'filetype_file': 'Microsoft ASF ASF_Extended_Content_Description_Object'} != {'filetype_file': 'Microsoft ASF ASF_Extended_Content_Description_Object, Audio Media (Codec Id 353, Number of channel...ght 120, Bits Per Pixel Count 24, Error correction type ASF_No_Error_Correction) ASF_Stream_Bitrate_Properties_Object'}
[ 31s] E Right contains 2 more items:
[ 31s] E {'data file': 'file:///home/abuild/rpmbuild/BUILD/typecode-30.0.0/tests/data/filetest/media/mov.wvm.wmv.yml',
[ 31s] E 'test_file': 'file:///home/abuild/rpmbuild/BUILD/typecode-30.0.0/tests/data/filetest/media/mov.wvm.wmv'}
[ 31s] tests/filetype_test_utils.py:216: AssertionError
[ 31s] =============================== warnings summary ===============================
[ 31s] src/typecode/magic2.py:195
[ 31s] /home/abuild/rpmbuild/BUILD/typecode-30.0.0/src/typecode/magic2.py:195: UserWarning: System libmagic found in typical location is used. Install instead a typecode-libmagic plugin for best support.
[ 31s] warnings.warn(
[ 31s]
[ 31s] tests/test_contenttype.py::TestContentTypeComplex::test_archive_squashfs_crashing
[ 31s] /home/abuild/rpmbuild/BUILD/typecode-30.0.0/src/typecode/magic2.py:270: UserWarning: Libmagic magic database not found. A default will be used if possible. Install instead a typecode-libmagic plugin for best support.
[ 31s] OR set the TYPECODE_LIBMAGIC_DB_PATH environment variable.
[ 31s] warnings.warn(
[ 31s]
[ 31s] -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
[ 31s] =========================== short test summary info ============================
[ 31s] SKIPPED [1] tests/test_contenttype.py:111: Hangs for now, for lack of proper sudo access on some test servers.
[ 31s] ======= 24 failed, 167 passed, 1 skipped, 1 xfailed, 2 warnings in 7.56s =======
I havent gotten typecode-libmagic working yet, so some of these are likely attributed to that. Still, the tests should detect missing
typecode-libmagic
and expect slightly different results where possible.