Getting ImportMismatchErrors in combination with Jenkins

Issue #172 on hold
CharlieC created an issue

Not sure what the problem is. Tox works fine locally but we've hit a few problems recently.

A sample TB can be found here

But the key line is:

E               ImportMismatchError: ('openpyxl.conftest', '/var/lib/jenkins/workspace/openpyxl-2.0/openpyxl/', local('/var/lib/jenkins/workspace/openpyxl-2.0/.tox/py34/lib64/python3.4/site-packages/openpyxl/'))

Looking at the source this relates to problems with file but what problems? Should the two files be the same?

Comments (8)

  1. Holger Krekel repo owner

    Not sure but Looks like you are collecting tests inside the .tox directory. Do you have any configuration of "norecursedirs" or something else that would py.test dive into your .tox directory?

  2. CharlieC reporter

    @ericgazoni you've got access to the box.

    @hpk thanks for the fast answer! We're now using pytest for everything in the project.

    addopts = -l --strict
    norecursedirs = lib include openpyxl/Issues
    markers =
        pil_required: PIL required to run test
        pil_not_installed: Run test only if PIL is not installed
        not_py33: Do not run test on Python 3.
        lxml_required: lxml required to run test
  3. Eric Gazoni

    The file as it is on the server: pytest.ini

    This is what jenkins does to run tox:

    find openpyxl -name *.pyc -delete
    virtualenv .ve
    source .ve/bin/activate
    pip install tox 

    Shall I add a new option to norecursedirs mentioning .tox ?

  4. Eric Gazoni

    Yup, did the trick, I'll add the norecursedirs for .tox to the configuration in the repository. Tests are starting slightly faster as well (I guess for not trying to recurse in the .tox directory)

  5. Log in to comment