fedora-python / pyp2rpm

Tool to convert a package from PyPI to RPM SPECFILE or to generate SRPM.
MIT License
128 stars 39 forks source link

Skip virtualenv tests if virtualenv-api is not installed #149

Closed mcyprian closed 6 years ago

mcyprian commented 6 years ago

virtualenv-api is an optional dependency of pyp2rpm. If it is not installed related tests will be skipped. This PR also contains small change in integration tests that prevents blocking of test_output directory. Integration tests can be run in parallel inside multiple virtual environments.

hroncok commented 6 years ago

Have a look at https://docs.pytest.org/en/latest/tmpdir.html - maybe using pytest fixtures here would work better?

mcyprian commented 6 years ago

I was looking in to tmdir fixture and my impression is that is is designed to be used in one particular method/function. I haven't found the way to use it in setup_method where TestFileEnvironment is created. At this moment we have only one test method in each class so it is also an possibility to move env creation to methods and use the fixture.

mcyprian commented 6 years ago

Thanks.