Emerging unittest2 with tests enabled fails on: - test_loadTestsFromName__unknown_module_name - test_loadTestsFromNames__unknown_module_name. From build.log, relevant part seems to be: ====================================================================== FAIL: test_loadTestsFromName__unknown_module_name (unittest2.test.test_loader.Te st_TestLoader) ---------------------------------------------------------------------- Traceback (most recent call last): File "/var/tmp/portage/dev-python/unittest2-0.5.1-r1/work/unittest2-0.5.1-pyth on3_3/lib/unittest2/test/test_loader.py", line 240, in test_loadTestsFromName__u nknown_module_name loader.loadTestsFromName('sdasfasfasdf') ImportError: No module named 'sdasfasfasdf' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/var/tmp/portage/dev-python/unittest2-0.5.1-r1/work/unittest2-0.5.1-pyth on3_3/lib/unittest2/test/test_loader.py", line 242, in test_loadTestsFromName__u nknown_module_name self.assertEqual(str(e), "No module named sdasfasfasdf") AssertionError: "No module named 'sdasfasfasdf'" != 'No module named sdasfasfasd f' - No module named 'sdasfasfasdf' ? - - + No module named sdasfasfasdf ====================================================================== FAIL: test_loadTestsFromNames__unknown_module_name (unittest2.test.test_loader.T est_TestLoader) ---------------------------------------------------------------------- Traceback (most recent call last): File "/var/tmp/portage/dev-python/unittest2-0.5.1-r1/work/unittest2-0.5.1-pyth on3_3/lib/unittest2/test/test_loader.py", line 620, in test_loadTestsFromNames__ unknown_module_name loader.loadTestsFromNames(['sdasfasfasdf']) ImportError: No module named 'sdasfasfasdf' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/var/tmp/portage/dev-python/unittest2-0.5.1-r1/work/unittest2-0.5.1-pyth on3_3/lib/unittest2/test/test_loader.py", line 622, in test_loadTestsFromNames__unknown_module_name self.assertEqual(str(e), "No module named sdasfasfasdf") AssertionError: "No module named 'sdasfasfasdf'" != 'No module named sdasfasfasd f' - No module named 'sdasfasfasdf' ? - - + No module named sdasfasfasdf
emerge --info Portage 2.2.7 (default/linux/ia64/13.0/desktop/gnome/systemd, gcc-4.6.3, glibc-2.17, 3.10.25-gentoo ia64) ================================================================= System uname: Linux-3.10.25-gentoo-ia64-Madison-with-gentoo-2.2 KiB Mem: 24987056 total, 23432080 free KiB Swap: 524272 total, 524272 free Timestamp of tree: Wed, 12 Feb 2014 21:30:01 +0000 ld GNU ld (GNU Binutils) 2.23.2 app-shells/bash: 4.2_p45 dev-java/java-config: 2.1.12-r1 dev-lang/python: 2.7.5-r3, 3.3.2-r2 dev-util/cmake: 2.8.11.2 dev-util/pkgconfig: 0.28 sys-apps/baselayout: 2.2 sys-apps/openrc: 0.12.4 sys-apps/sandbox: 2.6-r1 sys-devel/autoconf: 2.13, 2.69 sys-devel/automake: 1.11.6, 1.13.4 sys-devel/binutils: 2.23.2 sys-devel/gcc: 4.6.3, 4.7.3-r1 sys-devel/gcc-config: 1.7.3 sys-devel/libtool: 2.4.2 sys-devel/make: 3.82-r4 sys-kernel/linux-headers: 3.9 (virtual/os-headers) sys-libs/glibc: 2.17 Repositories: gentoo my_ebuilds ACCEPT_KEYWORDS="ia64" ACCEPT_LICENSE="* -@EULA" CBUILD="ia64-unknown-linux-gnu" CFLAGS="-mtune=itanium2 -O2 -pipe" CHOST="ia64-unknown-linux-gnu" CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo" CXXFLAGS="-mtune=itanium2 -O2 -pipe" DISTDIR="/usr/portage/distfiles" FCFLAGS="-O2 -pipe" FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync" FFLAGS="-O2 -pipe" GENTOO_MIRRORS="ftp://mirrors.linuxant.fr/distfiles.gentoo.org/" LANG="fr_FR.UTF-8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" MAKEOPTS="-j3" PKGDIR="/usr/portage/packages" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/var/lib/layman/my_ebuilds" USE="X a52 aac acl acpi alsa berkdb branding bzip2 cairo cdda cdr cli colord cracklib crypt cups cxx dbus dri dts dvdr eds encode evo exif fam firefox flac fortran gdbm gif gnome gnome-keyring gnome-online-accounts gpm gstreamer gtk ia64 iconv introspection ipv6 jpeg lcms ldap libnotify libsecret mad mng modules mp3 mp4 mpeg nautilus ncurses nls nptl ogg opengl openmp pam pango pcre pdf png policykit ppds pulseaudio qt3support qt4 readline sdl session socialweb spell ssl startup-notification svg systemd tcpd tiff truetype udev udisks unicode upower usb vorbis wxwidgets xcb xml xv xvid zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="fr" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_3" RUBY_TARGETS="ruby19 ruby18" USERLAND="GNU" VIDEO_CARDS="radeon" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, SYNC, USE_PYTHON
emerge -pqv [ebuild N ] dev-python/unittest2-0.5.1-r1 PYTHON_TARGETS="python2_7 python3_3 (-pypy2_0) -python2_6 -python3_2"
Created attachment 370676 [details] build.log
Created attachment 370678 [details] environment
Well, the modname is deliberate nonsense, The diff between the two is the ' that encompass the nonsense mod name. A trivial syntax thingy. $ ebuild unittest2-0.5.1-r2.ebuild clean test yields Ran 277 tests in various times for all the corresponding pythons. OK I have Installed versions: 3.3.4(3.3)(22:00:30 18/03/14) I wonder if you have 3.3.3. Save me re-emerging the py3.3 can you check and re-post? Nothing else obvious comes this mind.
Hi, (In reply to Ian Delaney from comment #5) > Installed versions: 3.3.4(3.3)(22:00:30 18/03/14) > > I wonder if you have 3.3.3. Save me re-emerging the py3.3 can you check and > re-post? Nothing else obvious comes this mind. I indeed have dev-lang/python-3.3.3 currently installed. So, upgrading to 3.3.4 should make this problem disappear? Émeric
(In reply to Émeric Maschino from comment #6) > > I indeed have dev-lang/python-3.3.3 currently installed. So, upgrading to > 3.3.4 should make this problem disappear? > > Émeric It could, worth a try
Why does unittest2 support python3 targets in the first place? Upstream says: unittest2 is a backport of the new features added to the unittest testing framework in Python 2.7. It is tested to run on Python 2.4 - 2.7. See: https://pypi.python.org/pypi/unittest2
(In reply to cel.gentoo from comment #8) > Why does unittest2 support python3 targets in the first place? > > Upstream says: > > unittest2 is a backport of the new features added to the unittest testing > framework in Python 2.7. It is tested to run on Python 2.4 - 2.7. > > See: https://pypi.python.org/pypi/unittest2 Well, that's just a tagline they don't follow. For example, they install a setuptools module -- that no standard Python library installs, obviously. So package using that module requires unittest2 in every Python version.
Well, there seems to be an extra module for python3: unittest2py3k Running tests for unittest2 with python3 targets does not seem to make any sense. They are not designed to work with python3 so why trying to test under python3? At least tests seem to work for python2.7. The unittest2py3k package does not provide a working testsuite at all. It says it works with Python 3.0, 3.1 and 3.2, but that does not seem to be case.
commit 0c4b99a75bbe488f10c4e25d759cf8ef7ed06dd2 Author: Justin Lecher <jlec@gentoo.org> Date: Mon Nov 23 10:25:46 2015 +0100 dev-python/unittest2: Drop old obsoletes Gentoo-Bug: https://bugs.gentoo.org/show_bug.cgi?id=501638 Package-Manager: portage-2.2.25 Signed-off-by: Justin Lecher <jlec@gentoo.org> https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0c4b99a75bbe488f10c4e25d759cf8ef7ed06dd2