testsuite doesn't run under py2.7 3.3 in release 2.5.0

Issue #235 resolved
idella5 created an issue

under py2.7, running tests yields;

>>> Source compiled.
>>> Test phase: dev-python/rpy-2.5.0
 * python2_7: running distutils-r1_run_phase python_test
__main__ (unittest.loader.LoadTestsFailure) ... ERROR

================================
ERROR: __main__ (unittest.loader.LoadTestsFailure)
---------------------------------------------------
ImportError: Start directory is not importable: 'robjects'

--------------------------------------------------------------------
Ran 1 test in 0.000s

FAILED (errors=1)
rpy2 version: 2.5.0
- built against R version: 3-1.1--66115
- running linked to R version: R version 3.1.1 (2014-07-10)

py3.3 similar.

>>> Source compiled.
>>> Test phase: dev-python/rpy-2.5.0
 * python3_3: running distutils-r1_run_phase python_test
__main__ (unittest.loader.LoadTestsFailure) ... rpy2 version: 2.5.0
- built against R version: 3-1.1--66115
- running linked to R version: R version 3.1.1 (2014-07-10)
ERROR

====================================
ERROR: __main__ (unittest.loader.LoadTestsFailure)
---------------------------------------------------------
Traceback (most recent call last):
  File "./rpy2/tests.py", line 33, in load_tests
    suite_robjects = loader.discover('robjects', pattern, rpy_root)
  File "/usr/lib64/python3.3/unittest/loader.py", line 211, in discover
    raise ImportError('Start directory is not importable: %r' % start_dir)
ImportError: Start directory is not importable: 'robjects'

----------------------------------------------------------------------
Ran 1 test in 0.001s

FAILED (errors=1)

py3.4

>>> Source compiled.
>>> Test phase: dev-python/rpy-2.5.0
 * python3_4: running distutils-r1_run_phase python_test
rpy2 version: 2.5.0
- built against R version: 3-1.1--66115
- running linked to R version: R version 3.1.1 (2014-07-10)
Error in loadNamespace(name) : there is no package called ggplot2

then completes with

Ran 379 tests in 5.998s

OK (skipped=5, expected failures=1)

ggplot2.py is present, not sure whether the suite later finds it and uses it or skips tests, however I suspect this is fine since it appears an optional test dep.

Comments (8)

  1. idella5 reporter

    No because afaict there are none. The method used in the prior version and this is python -m 'rpy2.tests', remembering that this saw all pass in the prior version.

    work/rpy2-2.5.0-python3_3/lib $ python3.3 -m 'rpy2.tests'
    rpy2 version: 2.5.0
    - built against R version: 3-1.1--66115
    - running linked to R version: R version 3.1.1 (2014-07-10)
    E
    ======================================================================
    ERROR: __main__ (unittest.loader.LoadTestsFailure)
    ----------------------------------------------------------------------
    Traceback (most recent call last):
      File "./rpy2/tests.py", line 33, in load_tests
        suite_robjects = loader.discover('robjects', pattern, rpy_root)
      File "/usr/lib64/python3.3/unittest/loader.py", line 211, in discover
        raise ImportError('Start directory is not importable: %r' % start_dir)
    ImportError: Start directory is not importable: 'robjects'
    
    ----------------------------------------------------------------------
    Ran 1 test in 0.001s
    
    FAILED (errors=1)
    
    work/rpy2-2.5.0-python2_7/lib $ python2.7 -m 'rpy2.tests'
    rpy2 version: 2.5.0
    - built against R version: 3-1.1--66115
    - running linked to R version: R version 3.1.1 (2014-07-10)
    E
    ======================================================================
    ERROR: __main__ (unittest.loader.LoadTestsFailure)
    ----------------------------------------------------------------------
    ImportError: Start directory is not importable: 'robjects'
    
    ----------------------------------------------------------------------
    Ran 1 test in 0.000s
    
    FAILED (errors=1)
    
    /work/rpy2-2.5.0-python3_4/lib $ python3.4 -m 'rpy2.tests'
    rpy2 version: 2.5.0
    - built against R version: 3-1.1--66115
    - running linked to R version: R version 3.1.1 (2014-07-10)
    Error in loadNamespace(name) : there is no package called ‘ggplot2’
    
    ............................................................................................................................................................................sss.........................................x.....................................................................................................................................................s......s.....
    ----------------------------------------------------------------------
    Ran 379 tests in 6.007s
    
    OK (skipped=5, expected failures=1)
    sys:1: ResourceWarning: unclosed file <_io.TextIOWrapper name='/dev/null' mode='w' encoding='UTF-8'>
    

    And also I don't pip install anything, ever. This is gentoo and the pm is portage, pas pip.

  2. Laurent Gautier

    There are instructions about running the tests. Look closely at the section about installation in the fine manual, or in the README file.

    Otherwise you have the 3rd-party package singledispatch (require for Python < 3.4) installed, don't you ?

  3. idella5 reporter

    Oh the one here?

    path/to../dev-python/rpy $ ls /mnt/gen2/TmpDir/portage/dev-python/rpy-2.5.0/work/rpy2-2.5.0/
    AUTHORS  bowtie2-2.2.4  doc  MANIFEST.in  NEWS  PKG-INFO  rpy  rpy2.egg-info  samtools-0.1.19  setup.cfg  setup.py
    

    A clue.

    ~/cvsPortage/gentoo-x86/dev-python/rpy $ grep README /mnt/gen2/TmpDir/portage/dev-python/rpy-2.5.0/work/rpy2-2.5.0/MANIFEST.in 
    
    global-include README
    include NEWS README AUTHORS
    

    However

    https://bitbucket.org/lgautier/rpy2/src/08ec0c15bd5ef8170ad8a49c2dc2b4a8dea36d64/README.md?at=default

    It appears I missed the need for singledispatch which is present in setup.py, perhaps because I've never come across it or a need of it before. It's not in portage so I shall have to write an ebuild for it and add it.

  4. idella5 reporter

    Missing info in the doc can happen, and is generally fixed when reported

    Remember https://bitbucket.org/lgautier/rpy2/issue/229/

    Missing info in the doc isn't what occurred here. The README.md never made it to the tarball because README.md != README. An entry of README* would pull in unwanted README files in the bundled packages. Yes the content is on the page of Source however my first port of call is to peruse such a file in the tarball. The mode of running the tests from the prior version was fine. It was missing the new package which is a good one to know.

    ~/cvsPortage/gentoo-x86/dev-python/rpy $ PYTHON_TARGETS=python3_3 ebuild rpy-2.5.0.ebuild clean test
    
     * python3_3: running distutils-r1_run_phase python_test
    rpy2 version: 2.5.0
    - built against R version: 3-1.1--66115
    - running linked to R version: R version 3.1.1 (2014-07-10)
    Error in loadNamespace(name) : there is no package called ‘ggplot2’
    
    Ran 379 tests in 5.929s
    
    OK (skipped=5, expected failures=1)
    >>> Completed testing dev-python/rpy-2.5.0
    

    ditto py2.7. C'est bon ca(add cedilla)

  5. Log in to comment