Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 482488 - dev-python/mock-1.0.1-r1: Incomplete test dependencies
Summary: dev-python/mock-1.0.1-r1: Incomplete test dependencies
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Python Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-08-26 02:07 UTC by Patrick Lauer
Modified: 2015-02-20 07:57 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Lauer gentoo-dev 2013-08-26 02:07:29 UTC
======================================================================
ERROR: Failure: ImportError (No module named unittest2)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib64/python2.7/site-packages/nose/loader.py", line 413, in loadTestsFromName
    addr.filename, addr.module)
  File "/usr/lib64/python2.7/site-packages/nose/importer.py", line 47, in importFromPath
    return self.importFromDir(dir_path, fqname)
  File "/usr/lib64/python2.7/site-packages/nose/importer.py", line 94, in importFromDir
    mod = load_module(part_fqname, fh, filename, desc)
  File "/var/tmp/portage/dev-python/mock-1.0.1-r1/work/mock-1.0.1/tests/testwith.py", line 4, in <module>
    from tests._testwith import *
  File "/var/tmp/portage/dev-python/mock-1.0.1-r1/work/mock-1.0.1/tests/_testwith.py", line 7, in <module>
    from tests.support import unittest2, is_instance
  File "/var/tmp/portage/dev-python/mock-1.0.1-r1/work/mock-1.0.1/tests/support.py", line 8, in <module>
    import unittest2
ImportError: No module named unittest2

----------------------------------------------------------------------
Ran 7 tests in 0.070s

FAILED (errors=7)
 * ERROR: dev-python/mock-1.0.1-r1::gentoo failed (test phase):
 *   Tests fail with python2.7
 * 
 * Call stack:
 *     ebuild.sh, line   93:  Called src_test
 *   environment, line 3568:  Called distutils-r1_src_test
 *   environment, line 1105:  Called _distutils-r1_run_foreach_impl 'python_test'
 *   environment, line  269:  Called python_parallel_foreach_impl 'distutils-r1_run_phase' 'python_test'
 *   environment, line 3425:  Called multibuild_parallel_foreach_variant '_python_multibuild_wrapper' 'distutils-r1_run_phase' 'python_test'
 *   environment, line 2676:  Called multibuild_foreach_variant '_multibuild_parallel' '_python_multibuild_wrapper' 'distutils-r1_run_phase' 'python_test'
 *   environment, line 2624:  Called _multibuild_run '_multibuild_parallel' '_python_multibuild_wrapper' 'distutils-r1_run_phase' 'python_test'
...... *   environment, line 2622:  Called _multibuild_parallel '_python_multibuild_wrapper' 'distutils-r1_run_phase' 'python_test'
......... *   environment, line 2667:  Called _python_multibuild_wrapper 'distutils-r1_run_phase' 'python_test'
........... *   environment, line  626:  Called distutils-r1_run_phase 'python_test'
.......... *   environment, line 1041:  Called python_test
.. *   environment, line 3460:  Called die
. * The specific snippet of code:
....../usr/lib64/python3.2/unittest/case.py:453: RuntimeWarning: TestResult has no addExpectedFailure method, reporting as passes
  RuntimeWarning)
........ *       nosetests || die "Tests fail with ${EPYTHON}"
SS.... * 
S.. * If you need support, post the output of `emerge --info '=dev-python/mock-1.0.1-r1::gentoo'`,
. * the complete build log and the output of `emerge -pqv '=dev-python/mock-1.0.1-r1::gentoo'`.
/usr/lib64/portage/bin/isolated-functions.sh: line 188: wait: `Tests fail with python2.7': not a pid or valid job spec
 * The complete build log is located at '/var/tmp/portage/dev-python/mock-1.0.1-r1/temp/build.log'.
..... * The ebuild environment file is located at '/var/tmp/portage/dev-python/mock-1.0.1-r1/temp/environment'.
.. * Working directory: '/var/tmp/portage/dev-python/mock-1.0.1-r1/work/mock-1.0.1'
....... * S: '/var/tmp/portage/dev-python/mock-1.0.1-r1/work/mock-1.0.1'
..............S.....SS..............................S........................SS..........................................................................................................................
----------------------------------------------------------------------
Ran 278 tests in 0.630s

OK (SKIP=9)

>>> Failed to emerge dev-python/mock-1.0.1-r1, Log file:


*  dev-python/unittest2
      Latest version available: 0.5.1-r1
      Latest version installed: [ Not Installed ]
      Size of files: 115 kB
      Homepage:      http://pypi.python.org/pypi/unittest2 http://pypi.python.org/pypi/unittest2py3k http://code.google.com/p/unittest-ext/
      Description:   The new features in unittest for Python 2.7 backported to Python 2.4+
      License:       BSD

*  virtual/python-unittest2
      Latest version available: 1-r2
      Latest version installed: 1-r2
      Size of files: 0 kB
      Homepage:      
      Description:   A virtual for packages needing unittest2 in Python 2.5, 2.6, 3.1
      License:
Comment 1 Patrick Lauer gentoo-dev 2014-04-21 09:35:16 UTC
>>> Source compiled.
 * python3_3: running distutils-r1_run_phase python_test
 * python2_7: running distutils-r1_run_phase python_test
/var/tmp/portage/dev-python/mock-1.0.1-r2/temp/environment: line 3380: nosetests: command not found
 * ERROR: dev-python/mock-1.0.1-r2::gentoo failed (test phase):
 *   Tests fail with python3.3
/var/tmp/portage/dev-python/mock-1.0.1-r2/temp/environment: line 3380: nosetests: command not found
 * 
 * ERROR: dev-python/mock-1.0.1-r2::gentoo failed (test phase):
 * Call stack:
 *   Tests fail with python2.7


zomgwtfbbq.
Comment 2 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-04-21 11:28:26 UTC
Forward-fixed it for unittest2.

-	test? ( dev-python/nose[${PYTHON_USEDEP}]
-		virtual/python-unittest2[${PYTHON_USEDEP}] )"
+	test? (
+		dev-python/nose[${PYTHON_USEDEP}]
+		$(python_gen_cond_dep 'dev-python/unittest2[${PYTHON_USEDEP}]' python2*)
+	)"

As for nose, it looks like an issue with your test system.