Package Base Details: python2-pyxdg

Git Clone URL: https://aur.archlinux.org/python2-pyxdg.git (read-only, click to copy)
Submitter: MarsSeed
Maintainer: tallero
Last Packager: MarsSeed
Votes: 1
Popularity: 0.000002
First Submitted: 2022-06-18 01:23 (UTC)
Last Updated: 2022-07-08 20:06 (UTC)

Latest Comments

MarsSeed commented on 2022-06-26 17:25 (UTC) (edited on 2022-07-06 19:16 (UTC) by MarsSeed)

I've updated the package to 0.28 and opted to disable testing altogether.

MarsSeed commented on 2022-06-26 17:22 (UTC) (edited on 2022-06-26 17:26 (UTC) by MarsSeed)

Thanks for reporting it.

Actually, many tests in this package are extremely shitty. They are in fact tailored for a full Ubuntu installation, and they query information from the whole system.

I suspect that is the problem in this MimeType 'msword' vs 'wps-office.doc' error.

Another test seeks to find the icon file of the system-installed Firefox, and if someone does not have that, it will fail.

Arch actually don't even test the Python 3 version of this library at all.

My preferred approach would be to blacklist (skip) known-unstable tests, like those that rely on system data, not testdata.

In general I am in favor of using testing for AUR builds, especially if (1) they are not extremely resource-intensive and (2) if they are self-contained and reproducible.

Also (3) I strongly prefer testing in case of legacy packages, because upstream support / testing might be missing, so user-side build verification might be the last remaining line of defense against incompatible dependencies or misconfigurtions etc.

As for this package, it violates point (2) above: its tests are not reproducible because the testcases are not self-contained.

dreieck commented on 2022-06-26 13:23 (UTC)

check() fails for me with AssertionError: 'wps-office.doc' != 'msword':

==> Starting check()...
#1 test_load_config_paths (test-basedirectory.BaseDirectoryTest) ... ok
#2 test_load_first_config (test-basedirectory.BaseDirectoryTest) ... ok
#3 test_runtime_dir (test-basedirectory.BaseDirectoryTest) ... ok
#4 test_runtime_dir_notset (test-basedirectory.BaseDirectoryTest) ... ok
#5 test_save_cache_path (test-basedirectory.BaseDirectoryTest) ... ok
#6 test_save_config_path (test-basedirectory.BaseDirectoryTest) ... ok
#7 test_save_data_path (test-basedirectory.BaseDirectoryTest) ... ok
#8 test_basic (test-desktop.DesktopEntryTest) ... ok
#9 test_invalid (test-desktop.DesktopEntryTest) ... ok
#10 test_invalid_unicode (test-desktop.DesktopEntryTest) ... ok
#11 test_unicode_name (test-desktop.DesktopEntryTest) ... ok
#12 test_validate (test-desktop.DesktopEntryTest) ... ok
#13 test_values (test-desktop.DesktopEntryTest) ... ok
#14 test_write_file (test-desktop.DesktopEntryTest) ... ok
#15 test_absent (test-desktop.TestTryExec) ... ok
#16 test_no_TryExec (test-desktop.TestTryExec) ... ok
#17 test_present (test-desktop.TestTryExec) ... ok
#18 test_read_icon_data (test-icon.IconDataTest) ... ok
#19 test_find_icon_exists (test-icon.IconThemeTest) ... ok
#20 test_find_icon_nonexistant (test-icon.IconThemeTest) ... ok
#21 test_validate_icon_theme (test-icon.IconThemeTest) ... ok
#22 test_check_string (test-inifile.IniFileTest) ... ok
#23 test_modify (test-inifile.IniFileTest) ... ok
#24 test_value_types (test-inifile.IniFileTest) ... ok
#25 test_expand_languages (test-locale.LocaleTest) ... ok
#26 test_rule_from_filename (test-menu-rules.RulesTest) ... ok
#27 test_rule_from_node (test-menu-rules.RulesTest) ... ok
#28 test_empty_legacy_dirs (test-menu.MenuTest) ... ok
#29 This was failing on systems which didn't have kde-config installed. ... ok
#30 test_parse_layout (test-menu.MenuTest) ... ok
#31 test_parse_menu (test-menu.MenuTest) ... ok
#32 test_unicode_menuentry (test-menu.MenuTest) ... ok
#33 test_all_matches (test-mime.GlobDBTest) ... ok
#34 test_build_globdb (test-mime.GlobDBTest) ... ok
#35 test_first_match (test-mime.GlobDBTest) ... ok
#36 test_get_extensions (test-mime.GlobDBTest) ... ok
#37 test_parsing (test-mime.GlobsParsingTest) ... ok
#38 test_match_data (test-mime.MagicDBTest) ... ok
#39 test_match_file (test-mime.MagicDBTest) ... ok
#40 test_match_nested (test-mime.MagicDBTest) ... ok
#41 test_parsing (test-mime.MagicDBTest) ... ok
#42 test_by_name (test-mime.MimeTest) ... ok
#43 test_canonical (test-mime.MimeTest) ... ok
#44 test_create_mimetype (test-mime.MimeTest) ... ok
#45 test_get_comment (test-mime.MimeTest) ... ok
#46 test_get_type (test-mime.MimeTest) ... ok
#47 test_get_type2 (test-mime.MimeTest) ... FAIL
#48 test_get_type_by_contents (test-mime.MimeTest) ... ok
#49 test_get_type_by_data (test-mime.MimeTest) ... ok
#50 test_get_type_by_name (test-mime.MimeTest) ... ok
#51 test_inheritance (test-mime.MimeTest) ... ok
#52 test_is_text (test-mime.MimeTest) ... ok
#53 test_lookup (test-mime.MimeTest) ... ok
#54 test_mimetype_repr (test-mime.MimeTest) ... ok
#55 test_get_files (test-recentfiles.RecentFilesTest) ... ok
#56 test_modify (test-recentfiles.RecentFilesTest) ... ok

======================================================================
FAIL: test_get_type2 (test-mime.MimeTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/felics/.cache/yay/python2-pyxdg/src/pyxdg-rel-0.27/test/test-mime.py", line 90, in test_get_type2
    self.check_mimetype(Mime.get_type2(example_file('word.doc')), 'application', 'msword')
  File "/home/felics/.cache/yay/python2-pyxdg/src/pyxdg-rel-0.27/test/test-mime.py", line 15, in check_mimetype
    self.assertEqual(mimetype.subtype, subtype)
AssertionError: 'wps-office.doc' != 'msword'

----------------------------------------------------------------------
Ran 56 tests in 6.142s

FAILED (failures=1)
==> ERROR: A failure occurred in check().

Regards!