Open Bug 1724273 Opened 3 years ago Updated 3 years ago

Allow associating python-tests with command virtualenvs

Categories

(Firefox Build System :: Mach Core, enhancement, P2)

enhancement

Tracking

(Not tracked)

People

(Reporter: mhentges, Unassigned)

References

(Blocks 1 open bug)

Details

For example, if I'm writing a test for code that imports zstandard, then my test environment will need to have zstandard installed, in addition to my test-specific dependencies (pytest, etc).

I think the solution here is to:

  • Allow defining command-virtualenv in python.ini for test files.
  • When a test file is run and it has a command-virtualenv defined, it'll use the python-test-$command virtualenv, which contains both the command's dependencies in addition to test dependencies
  • When a test file is run that doesn't have command-virtualenv defined, it'll use the python-test virtualenv, which contains only test dependencies.
Blocks: 1712131
Blocks: 1712151
Priority: -- → P2

An example of this being needed is for the mozproxy/tests/test_command_line.py tests, which tries to install the dependencies of mozinfo, mozlog and mozproxy (using their old, potentially out-of-date setup.py files).

No longer blocks: 1712151
Depends on: 1712151
You need to log in before you can comment on or make changes to this bug.