Commit Graph
20 Commits
Author SHA1 Message Date
Michael R. Crusoe 67273472b5 more type hints 2026-04-15 15:16:36 +02:00
Arash 8571240ccb Refactor TestFrameworkTools to include ConfiguresDatabaseVault for credential testing 2026-03-16 11:53:01 +01:00
Arash 72cd9d4eeb Add credential integration test tool and configuration 2026-03-16 11:52:56 +01:00
Nicola Soranzo 9a520d5d28 Remove/replace unnecessary casts 2025-10-29 16:34:17 -04:00
John Chilton 2e4a50a38c Tool Request API... 2025-10-29 16:33:22 -04:00
Nicola Soranzo 7f89e0eab9 Code cleanups from pyupgrade
Found by running:

```
make pyupgrade
ruff check --fix .
ruff check --preview --unsafe-fixes --select=F401 --fix .
make format
make update-client-api-schema
```

The bulk of the changes are replacements of typing deprecated aliases
such as `Dict` and `List` with the standard library classes. These
aliases became redundant in Python 3.9 when the corresponding
pre-existing classes were enhanced to support `[]`, see
https://docs.python.org/3/library/typing.html#deprecated-aliases

Also:
- Update the `pyupgrade` Makefile target to use `--py38-plus` for the
  packages needed by Pulsar, including the new galaxy-tool-util-models
  package.
2025-07-31 11:17:22 +01:00
mvdbeek d65d3112ac Make framework tool tests use driver fixture 2024-01-01 15:05:19 +02:00
Nicola Soranzo 30f60493c3 Format Python code with black 23.1.0
with manual fixes to 3 files to make them compatible with black 22.12.0 .

We need to keep black pinned at `<23` until we vendorise `packaging`, since
the new version of black depends on `packaging >=22.0` which is the version
where `LegacyVersion` (which we use for tool lineages) was removed.
2023-02-01 23:51:03 +00:00
mvdbeek c01e6b8797 Install conda for framework tests 2022-11-20 08:58:33 +01:00
mvdbeek f24eaa581a Use APITestCase class to run framework tool tests 2022-11-18 18:35:15 +01:00
mvdbeek ba593057c2 Use `galaxy_driver_class` to create tool shed driver
Use ``autouse`` fixture to configure test driver
2022-11-01 18:45:07 +00:00
Dannon Baker 623a5e165a Apply black formatting.
Apply isort.
2022-02-03 07:42:20 -05:00
Nicola Soranzo d26b3d9848 Fix all E203, E741 and W504 flake8 errors 2021-01-18 10:35:41 +00:00
John Chilton 45019c3fbd Move galaxy testing utilities into more sane package structure.
Split test/base into lib/galaxy_test/base and lib/galaxy_test/driver. Dividing things on whether they import galaxy-app code or not - with the goal of a galaxy-test-base package that doesn't depend on galaxy-app and a galaxy-test-driver package that does.

I've been refactoring around this division for a long time. Certain tests (namely the integration tests) always need to bootstrap Galaxy - but the API tests and the Selenium tests should be installable and runnable without Galaxy in the Python environment. So future galaxy-test-api and galaxy-test-selenium packages should have only an optional dependency on galaxy-test-driver.

Properly sturcturing these namespaces is a precursor for real packages on PyPI, clean separation of the tool shed testing code, and cleans up all the flake8 noqa hacks in test/.
2019-11-12 09:03:06 -05:00
mvdbeek e73257f8ed Set conda_auto_init and conda_auto_install to true for pytest driver 2018-08-25 14:17:22 +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 0b64442ed3 Skip tool tests in test/functional/known_broken_tools.txt 2018-08-25 14:16:22 +02:00
mvdbeek 2b275b7df0 Start counting test numbers at 1 and use _test_n
That allows for nicer select syntax like
````
pytest test/functional/test_toolbox_pytest.py -k '(random_lines1 or Cut1) and _test_1'
```
2018-08-16 19:14:33 +02:00
mvdbeek 9e07d9cc06 Handle driver shutdown, show all test in pytest
This is pretty hackish as fixtures can't be used during test discovery.
To properly shut down the driver I've added a conftest.py file that will
be called when quitting pytest. We might be able to handle this a
little better if we wrote a full plugin, but for now this works.

Also now reports all test indexes, so you can select e.g test 2 of a
tool.
2018-08-16 18:44:05 +02:00
mvdbeek 7559b90a69 Setup a simple pytest tool test 2018-08-16 14:08:45 +02:00