pyxdg: tests failed

Matwey V. Kornilov matwey.kornilov at gmail.com
Sat Oct 10 13:03:03 PDT 2015


Hello,

With pyxdg 0.25 I see the following. It seems that there is a lack of
file-magic data. What could be a reason? Where magic file is looked for?

[   27s] + nosetests
[   28s] ..........................EFFEEEF...
[   28s]
======================================================================
[   28s] ERROR: test_by_name (test-mime.MimeTest)
[   28s]
----------------------------------------------------------------------
[   28s] Traceback (most recent call last):
[   28s]   File
"/home/abuild/rpmbuild/BUILD/pyxdg-0.25/test/test-mime.py", line 68, in
test_by_name
[   28s]     self.check_mimetype(dot_c, 'text', 'x-csrc')
[   28s]   File
"/home/abuild/rpmbuild/BUILD/pyxdg-0.25/test/test-mime.py", line 10, in
check_mimetype
[   28s]     self.assertEqual(mimetype.media, media)
[   28s] AttributeError: 'NoneType' object has no attribute 'media'
[   28s]
[   28s]
======================================================================
[   28s] ERROR: test_get_type_by_contents (test-mime.MimeTest)
[   28s]
----------------------------------------------------------------------
[   28s] Traceback (most recent call last):
[   28s]   File
"/home/abuild/rpmbuild/BUILD/pyxdg-0.25/test/test-mime.py", line 29, in
test_get_type_by_contents
[   28s]     self.check_mimetype(imgpng, 'image', 'png')
[   28s]   File
"/home/abuild/rpmbuild/BUILD/pyxdg-0.25/test/test-mime.py", line 10, in
check_mimetype
[   28s]     self.assertEqual(mimetype.media, media)
[   28s] AttributeError: 'NoneType' object has no attribute 'media'
[   28s]
[   28s]
======================================================================
[   28s] ERROR: test_get_type_by_data (test-mime.MimeTest)
[   28s]
----------------------------------------------------------------------
[   28s] Traceback (most recent call last):
[   28s]   File
"/home/abuild/rpmbuild/BUILD/pyxdg-0.25/test/test-mime.py", line 19, in
test_get_type_by_data
[   28s]     self.check_mimetype(imgpng, 'image', 'png')
[   28s]   File
"/home/abuild/rpmbuild/BUILD/pyxdg-0.25/test/test-mime.py", line 10, in
check_mimetype
[   28s]     self.assertEqual(mimetype.media, media)
[   28s] AttributeError: 'NoneType' object has no attribute 'media'
[   28s]
[   28s]
======================================================================
[   28s] ERROR: test_get_type_by_name (test-mime.MimeTest)
[   28s]
----------------------------------------------------------------------
[   28s] Traceback (most recent call last):
[   28s]   File
"/home/abuild/rpmbuild/BUILD/pyxdg-0.25/test/test-mime.py", line 15, in
test_get_type_by_name
[   28s]     self.check_mimetype(appzip, 'application', 'zip')
[   28s]   File
"/home/abuild/rpmbuild/BUILD/pyxdg-0.25/test/test-mime.py", line 10, in
check_mimetype
[   28s]     self.assertEqual(mimetype.media, media)
[   28s] AttributeError: 'NoneType' object has no attribute 'media'
[   28s]
[   28s]
======================================================================
[   28s] FAIL: test_canonical (test-mime.MimeTest)
[   28s]
----------------------------------------------------------------------
[   28s] Traceback (most recent call last):
[   28s]   File
"/home/abuild/rpmbuild/BUILD/pyxdg-0.25/test/test-mime.py", line 75, in
test_canonical
[   28s]     self.check_mimetype(text_xml.canonical(), 'application', 'xml')
[   28s]   File
"/home/abuild/rpmbuild/BUILD/pyxdg-0.25/test/test-mime.py", line 10, in
check_mimetype
[   28s]     self.assertEqual(mimetype.media, media)
[   28s] AssertionError: 'text' != 'application'
[   28s]
[   28s]
======================================================================
[   28s] FAIL: test_get_type (test-mime.MimeTest)
[   28s]
----------------------------------------------------------------------
[   28s] Traceback (most recent call last):
[   28s]   File
"/home/abuild/rpmbuild/BUILD/pyxdg-0.25/test/test-mime.py", line 40, in
test_get_type
[   28s]     self.check_mimetype(imgpng, 'image', 'png')
[   28s]   File
"/home/abuild/rpmbuild/BUILD/pyxdg-0.25/test/test-mime.py", line 10, in
check_mimetype
[   28s]     self.assertEqual(mimetype.media, media)
[   28s] AssertionError: 'text' != 'image'
[   28s]
[   28s]
======================================================================
[   28s] FAIL: test_inheritance (test-mime.MimeTest)
[   28s]
----------------------------------------------------------------------
[   28s] Traceback (most recent call last):
[   28s]   File
"/home/abuild/rpmbuild/BUILD/pyxdg-0.25/test/test-mime.py", line 82, in
test_inheritance
[   28s]     self.assertEqual(text_python.inherits_from(),
set([text_plain, app_executable]))
[   28s] AssertionError: Items in the second set but not the first:
[   28s] <text/plain: (comment not loaded)>
[   28s] <application/x-executable: (comment not loaded)>
[   28s]
[   28s]
----------------------------------------------------------------------
[   28s] Ran 36 tests in 0.832s




More information about the xdg mailing list