Commit Graph

17 Commits

Author SHA1 Message Date
Nicola Soranzo b92731e0e4 Add `require_new_history marker to pytest.ini` 2022-11-08 00:34:05 +00:00
Nicola Soranzo afa7b713bc Replace `GALAXY_TEST_INCLUDE_SLOW env variable with external_dependency_management` pytest marker
Fix mulled tests missing tests in `test/unit/tool_util/test_conda_resolution.py` .

Also:
- Add `coverage` tox factor to generate coverage report.
2022-11-03 21:43:37 +00:00
Nicola Soranzo a5ff54489c Set default verbosity of pytest to 1
This is equivalent to the `-v` option, which e.g. shows each test inside a
file as a separate line in the output, showing the reason why a test was
skipped.

xref. https://docs.pytest.org/en/7.1.x/how-to/output.html#verbosity
2022-10-12 18:13:47 +01:00
Nicola Soranzo 7f03d51c17 Document how to profile memory use in tests 2022-09-27 03:34:55 +01:00
Nicola Soranzo 98439aa02e Specify `asyncio_mode` value for pytest-asyncio
Fix the following warning in unit tests:

```
.venv/lib/python3.7/site-packages/pytest_asyncio/plugin.py:191
  /home/runner/work/galaxy/galaxy/galaxy root/.venv/lib/python3.7/site-packages/pytest_asyncio/plugin.py:191: DeprecationWarning: The 'asyncio_mode' default value will change to 'strict' in future, please explicitly use 'asyncio_mode=strict' or 'asyncio_mode=auto' in pytest configuration file.
    config.issue_config_time_warning(LEGACY_MODE, stacklevel=2)
```
2022-05-12 16:38:14 +01:00
Nicola Soranzo 53f00e407e Update pytest configuration for v7.0
pytest 7.0 added a `pythonpath` setting that replaces (and breaks) the
pytest-pythonpath plugin:

https://docs.pytest.org/en/7.0.x/changelog.html#features
2022-02-07 11:50:55 +00:00
John Chilton 9a586a58b9 Add CWL conformance API tests
1) Download conformance tests to `test/functional/tools/cwl_tools` where
  they can be used also by framework and unit tests in the future.
2) Add populators to enable executing CWL conformance tests
3) Generate CWL conformance API tests only when needed for tests
2021-11-23 14:10:21 +00:00
Sergey Golitsynskiy 0b094438e0 Enable pytest class-based tests; add flag if n/a 2021-06-01 12:30:25 -04:00
Oleg Zharkov 4153970be8 rename to gtn_screenshot 2020-12-15 15:06:23 +01:00
Oleg Zharkov f509765b30 trailing line 2020-12-14 17:36:03 +01:00
Oleg Zharkov 2a632d8d67 add local, external decorators 2020-12-14 17:35:00 +01:00
Oleg Zharkov 8f4047f686 add pytest.ini 2020-12-14 17:03:52 +01:00
Oleg Zharkov f5501c4b97 add screenshot decorators 2020-12-14 16:51:37 +01:00
Nicola Soranzo 721a4656d9 pytest: disable test collection of classes starting with Test
Fix warnings like:

```
/home/travis/build/galaxyproject/galaxy/lib/galaxy/tools/verify/test_data.py:29: PytestWarning: cannot collect test class 'TestDataResolver' because it has a __init__ constructor
  class TestDataResolver(object):
```

appearing e.g. in https://travis-ci.org/galaxyproject/galaxy/jobs/428114139 .

See pytest documentation:
https://docs.pytest.org/en/latest/reference.html#confval-python_classes
2018-09-17 12:01:14 +01:00
mvdbeek 1c64cdd674 Use pytest to run unit and doctests 2018-08-25 14:17:58 +02:00
mvdbeek 300ab73c10 Mark skipped tests instead of not collecting them
Also marks tests as tool or data_manager, so `pytest -m
<tool|data_manager>` can be used to select a subset of tests.
2018-08-25 14:17:00 +02:00
mvdbeek bd92136841 Setup pytest python3 API testing 2018-08-10 22:08:15 +02:00