Skip to content
This repository has been archived by the owner on Mar 16, 2022. It is now read-only.

pytest failures #672

Closed
mestia opened this issue Sep 11, 2018 · 5 comments
Closed

pytest failures #672

mestia opened this issue Sep 11, 2018 · 5 comments

Comments

@mestia
Copy link

mestia commented Sep 11, 2018

Trying to build falcon I see pytest failures.
The first problem and the solution is described here: pytest-dev/pytest#3518

 pytest ./FALCON/test/test_util_system.py
=============================================================================================== test session starts ===============================================================================================
platform linux2 -- Python 2.7.15+, pytest-3.6.4, py-1.6.0, pluggy-0.6.0
rootdir: /tmp/pkg/falcon/FALCON, inifile: setup.cfg
collected 0 items / 1 errors                                                                                                                                                                                      

===================================================================================================== ERRORS ======================================================================================================
____________________________________________________________________________________ ERROR collecting test/test_util_system.py ____________________________________________________________________________________
FALCON/test/test_util_system.py:20: in <module>
    @pytest.fixture(scope="session")
/usr/lib/python2.7/dist-packages/_pytest/fixtures.py:960: in yield_fixture
    scope
/usr/lib/python2.7/dist-packages/_pytest/fixtures.py:898: in __call__
    "fixture is being applied more than once to the same function"
E   ValueError: fixture is being applied more than once to the same function
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 1 errors during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
============================================================================================= 1 error in 0.12 seconds =============================================================================================

I tried to solve this issue by removing @pytest.yield_fixture from FALCON/test/test_util_system.py
But after that 4 tests still fail:

=================================== FAILURES ===================================
______ [doctest] falcon_kit.mains.consensus_task.get_falcon_sense_option _______
045
046     >>> get_falcon_sense_option('', 11)
Expected:
    ' --n-core=11'
Got:
    ' --n-core=4'

/tmp/pkg/falcon/FALCON/falcon_kit/mains/consensus_task.py:46: DocTestFailure
------------------------------ Captured log call -------------------------------
consensus_task.py           40 WARNING  Requested nproc=11 > cpu_count=4; using 4
________ [doctest] falcon_kit.mains.consensus_task.get_pa_dazcon_option ________
057
058     >>> get_pa_dazcon_option('', 12)
Expected:
    ' -j 12'
Got:
    ' -j 4'

/tmp/pkg/falcon/FALCON/falcon_kit/mains/consensus_task.py:58: DocTestFailure
------------------------------ Captured log call -------------------------------
consensus_task.py           40 WARNING  Requested nproc=12 > cpu_count=4; using 4
_________________________ test_get_falcon_sense_option _________________________

    def test_get_falcon_sense_option():
>       assert consensus_task.get_falcon_sense_option('', 11) == ' --n-core=11'
E       AssertionError: assert ' --n-core=4' == ' --n-core=11'
E         -  --n-core=4
E         ?           ^
E         +  --n-core=11
E         ?           ^^

test/test_functional.py:304: AssertionError
------------------------------ Captured log call -------------------------------
consensus_task.py           40 WARNING  Requested nproc=11 > cpu_count=4; using 4
__________________________ test_get_pa_dazcon_option ___________________________

    def test_get_pa_dazcon_option():
>       assert consensus_task.get_pa_dazcon_option('', 12) == ' -j 12'
E       AssertionError: assert ' -j 4' == ' -j 12'
E         -  -j 4
E         +  -j 12

test/test_functional.py:308: AssertionError
------------------------------ Captured log call -------------------------------
consensus_task.py           40 WARNING  Requested nproc=12 > cpu_count=4; using 4
------------- generated xml file: /tmp/pkg/falcon/FALCON/test.xml --------------

Any hint on how to fix that?

@pb-cdunn
Copy link

Hmmm. Works for me. Which version of falcon (and SHA1) and of pytest (I used 3.3.1)?

@pb-cdunn
Copy link

Oh, sorry. We are no longer mirroring our internal FALCON repo here. In fact, I think this Issues board will disappear soon too, in favor of pbbioconda. So I think your source-code is way out of date. Unfortunately, my hands are tied.

@tillea
Copy link

tillea commented Sep 12, 2018

I have checked pbbioconda rules that are pointing to something that is named falcon. The latest version there is 2.1.0 while the falcon repository here has the latest version 2.1.4. This does not really look as if it were way out of date - but may be I've found the wrong successor of this code.
In general BioConda is doing nothing else than Debian - they are packaging source code. So if you somehow distribute the source code we can point our tools to the latest version you want to be distributed by any distributor - be it BioConda, Debian and its derivatives or other Linux or BSD distributions. The restriction to BioConda only seems on one hand artificial and on the other hand not the best way to spread Pacific Biosciences software to the community. I'm aware about the popularity of BioConda but integration into a distribution like Debian is something that is orthogonal to the single user installation by BioConda and you would waste feedback like this kind of reports here if you apply that restriction actively.

@pb-cdunn
Copy link

We use pb-falcon. Some other user created falcon.

Source-distributions are available (for now) in pypeFLOW releases, which are used by the pb-falcon bioconda recipe.

The pb-assembly bioconda should have everything you need, though you may need to avoid installing that errant falcon recipe.

@tillea
Copy link

tillea commented Sep 13, 2018 via email

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants