Skip to content

Conflicting test imports #108

@nikeethr

Description

@nikeethr

RE: "random" test failure

I suspect this has to do with pytest import modes: https://pytest.org/en/7.4.x/explanation/pythonpath.html#import-modes

Hypothesis:

with the default i.e. prepend, having two tests directory in the mono repo with __init__.py specified will cause conflicts. It could be that pipeline package was the only package with __init__.py in its tests folder (needs verification). Introducing __init__.py to site_archive_nci/tests caused two "tests" modules to be recognised, with site_archive_nci taking precedence, since it is installed last (due to prepend - LIFO). This may have caused helper functions in pipeline to not be recognized.

Regardless of precedence, we want the ability for package tests to have utility modules since they are in some instances easier to write and organise than fixtures.

There are a few options to work around this, but its beyond the scope of this issue.

Originally posted by @nikeethr in #106 (comment)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions