Commit Graph

3 Commits

Author SHA1 Message Date
Andrew Ekstedt f244234248 Register pytest.mark.slow marker
Pytest started warning about unknown markers at some point. Not sure
when. My local version doesn't do it but the CI versions do.

> PytestUnknownMarkWarning: Unknown pytest.mark.slow - is this a typo?
  You can register custom marks to avoid this warning - for details, see
  https://docs.pytest.org/en/stable/mark.html
2021-03-21 15:39:02 -07:00
Andrew Ekstedt 0094e9584c Modernize our use of py.test
This commit updates the tests to take advantage of some of py.test's
newer features.  Requires py.test 2.3 or newer.  Tested with 2.3.0 and
2.5.2.

Tests which were parametrized now use py.test's built-in
parametrization[1].

The session and lookup objects are now implemented as fixtures[2].
The media root is a fixture as well.  Fixtures are automatically passed
to any function that expects them.

Since the session is now created in one place, it is now possible to
provide an engine URI on the command line when running py.test.  Ditto
for the index directory.  (But the environment variables still work of
course.)

Slow tests are now marked as such and not run unless the --all option is
given.

A couple media tests are marked as xfail (expected to fail) because they
are broken.

[1]: http://pytest.org/latest/parametrize.html
[2]: http://pytest.org/latest/fixture.html
2014-07-06 21:45:05 -07:00
Petr Viktorin 332647c362 Switch to py.test #604 2011-05-06 12:40:44 +03:00