Closed solvejgdinger closed 5 years ago
I made the exact changes yesterday, so +1 from me. Unfortunately, the py36 scripts fail for me on this branch ($ tox -escripts-py36
), so I'll merge your changes with mine and try to get this working. I'll open another PR later today.
@jgliss PR #16 includes these changes. You might as well merge or delete this PR.
There were several things which needed changing
A
pytest.fixture
should not be called direclty but only as argument to a test function. Fixtures can be modular to build more complex structures.The
scope
parameter has to be be defined direclty in the fixture declaration. Instead, as function argument, it get's ignored (scope='function' by default). Also, in most cases a scope='function' is more appropriate.Interesting to note here is that the number values in the test fucntions change depending on how often the fixtures are called (scope='module' vs 'function'). E.g.
test_geometry(geometry)
will fail if the scope of fixturegeometry
was changed. This might indicate that there are potential problems with hidden parameters which do not reset within the pyplis classes.I tested on python 2.7.13 with pytest 3.6.1 and on python 3.6.8 with pytest 4.0.2. I did not retest in python 3.7. Only failure is ex06 in python 2 as discussed in #11