Nicola Soranzo
9978004f34
Fix tests after Python 3.12 changes for comprehensions
2024-01-21 20:46:09 +00:00
Nicola Soranzo
ab99721900
Merge branch 'release_23.0' into dev
2023-05-14 14:40:28 +01:00
mvdbeek
69ebbb761a
Replace httpbin service with pytest-httpserver
...
httpbin isn't doing too well, this should be more robust.
2023-05-04 19:48:54 +02:00
mvdbeek
d2271e5e04
Replace httpbin service with pytest-httpserver
...
httpbin isn't doing too well, this should be more robust.
2023-05-04 17:38:19 +02:00
John Davis
dacc38698b
Add utility function for enum member values + test
2023-04-13 18:53:44 -04:00
Nicola Soranzo
64af46c4ae
Fix new B018 errors raised by ruff 0.0.260
2023-04-13 16:53:01 +01:00
mvdbeek
c431c6f0fc
Tighten pytest raises assertions
2023-01-21 12:54:05 +01:00
Nicola Soranzo
c5868cc717
Add overloads to `listify()` type annotations
...
Also:
- Add unit tests.
2022-11-28 04:50:03 +00:00
John Davis
3b488017b1
Normalize path before checking basename
2022-11-21 18:12:04 -05:00
John Davis
b2d6b8d40d
Skip dbscript tests if running from packages; refactor util function
2022-11-21 18:12:04 -05:00
John Davis
86cc0f2b69
Move custom templates into the config package
2022-11-21 18:12:04 -05:00
Nicola Soranzo
2b362fbd1d
Merge branch 'release_22.05' into dev
2022-11-17 22:50:45 +00:00
Nicola Soranzo
988f4e583c
Merge branch 'release_22.01' into release_22.05
2022-11-17 22:48:35 +00:00
Nicola Soranzo
c80577e0b3
Fix setting `LC_CTYPE` variable in clean environment on macOS
...
Fix some older tools (not using `profile` or `stdio`) failing because
of the following warning printed on stderr when run locally on macOS:
```
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LC_ALL = (unset),
LC_CTYPE = "C.UTF-8",
LANG = (unset)
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
```
2022-11-17 10:50:07 +00:00
mvdbeek
304b12c143
Move things around
2022-11-16 17:01:28 +01:00
mvdbeek
69673a354b
Skip test if httpbin down
2022-11-16 15:24:40 +01:00
Cameron Hyde
c00d6d1de0
Fix linting
2022-11-10 19:10:20 +11:00
Cameron Hyde
fc9f3c3974
Remove import from manager and hard-code TEMPLATE_RELPATH
2022-11-01 15:13:54 +10:00
Cameron Hyde
f1f9f6c87f
Formatting
2022-11-01 12:25:48 +10:00
Cameron Hyde
48e1f055ba
Assert default template render against DOCTYPE tag
2022-11-01 12:23:29 +10:00
Cameron Hyde
ab6b126fa1
Assert custom template test against entire expected content
2022-11-01 12:19:48 +10:00
Cameron Hyde
5f9c2300e3
Set template relpaths as variables in managers/users.py
2022-11-01 12:16:51 +10:00
Cameron Hyde
dbc9cfbe9b
Remove redundant template context
2022-11-01 12:13:23 +10:00
Cameron Hyde
3210a1961d
Refactor tests to use template activation-email.txt from codebase
2022-11-01 09:49:26 +10:00
Cameron Hyde
296b1081f8
Formatting
2022-10-31 14:57:59 +10:00
Cameron Hyde
80d92a1eab
Add tests for custom template rendering
2022-10-31 13:59:09 +10:00
John Davis
66ceff374a
Ignore type error in test: wrong value is intentional
2022-10-13 13:42:00 -04:00
John Davis
4818c8dadf
Add get_from_env utility + tests
2022-10-13 13:17:15 -04:00
Nicola Soranzo
c35d8f2a06
Replace `unittest.TestCase` with pytest-based partial re-implementation
...
Also:
- Rename `FooBarTestCase` test classes as `TestFooBar`. These were collected
by pytest only because they were `unittest.TestCase` derived, but normally
pytest collects only test classes whose name starts with `Test`, see
https://docs.pytest.org/en/7.1.x/reference/reference.html#confval-python_classes
2022-09-27 03:34:58 +01:00
John Chilton and Nicola Soranzo
2026d079b5
Update test/unit/util/test_properties.py
...
Co-authored-by: Nicola Soranzo <nicola.soranzo@gmail.com >
2022-08-25 12:26:18 -04:00
John Chilton
ff80452421
Strong typing for galaxy.util.properties.
2022-08-24 17:37:08 -04:00
davelopez
4846d04dad
Add unit test for quoted strings with spaces
2022-08-05 15:54:04 +02:00
mvdbeek
73c73e0822
Test Decimal/inf/nan value dumping
2022-07-08 19:39:38 +03:00
John Chilton
5cd81741a7
Allow quoting in search library for exact matches (e.g. filtering on specific tags/tools).
2022-04-30 20:10:52 -04:00
John Chilton
da8fe33e9a
Typing and testing for baseline galaxy.util.search functionality.
2022-04-30 20:10:52 -04:00
Nicola Soranzo
2f0f4c7e08
Replace 2 uses of deprecated `imp` module
...
Also:
- Move doctests for `in_directory()` function to unit tests, add test
for `local_path_module` parameter to exercise the posixpath/ntpath
import code.
2022-04-21 19:53:35 +01:00
mvdbeek
b39e8ad9a2
First pass in dropping uwsgi specific things
2022-03-15 21:31:59 +01:00
Dannon Baker
623a5e165a
Apply black formatting.
...
Apply isort.
2022-02-03 07:42:20 -05:00
Nicola Soranzo
b9b0046621
Remove unnecessary checks for Python version
2021-11-26 15:30:09 +00:00
mvdbeek
8f300a5289
Move doctest to unittest
2021-11-19 13:20:06 +01:00
John Chilton
32cf97d78a
Type fixes for lazy_process.py
2021-10-14 00:51:10 -04:00
John Chilton
54e8d22fa7
Check types of modules without type annotations in the their signatures on new modules.
...
https://mypy.readthedocs.io/en/stable/command_line.html#cmdoption-mypy-check-untyped-defs
> it type checks the body of every function, regardless of whether it has type annotations. (By default the bodies of functions without annotations are not type checked.)
2021-10-11 16:08:26 -04:00
John Chilton
8f9034a414
Typing fixes for various unit tests.
2021-10-05 13:22:41 -04:00
mvdbeek
c389a2ca44
Also create deepcopy of objects passed into safe_loads
...
It's not used in many places, this shouldn't have much impact on
performance, and I guess it's a fair assumption that something called
json.safe_loads would return a deepcopy. That's complementary to the
previous commit and would also separately fix the issues referenced
there.
2021-06-14 18:43:47 +02:00
mvdbeek
e0f0fa338e
Add periodic history audit prune task
...
that runs when not using celery.
2021-05-11 18:34:30 +02:00
davelopez
e71b92a9f8
Add more tests for invalid expressions
2021-04-06 11:17:55 +02:00
davelopez
f8ace37cb4
Add expression validation when the configuration is parsed.
...
This will stop Galaxy from starting with an invalid expression defined in the configuration.
2021-04-06 11:17:55 +02:00
davelopez
03795b766e
Add generic boolean expression evaluator + unit tests
2021-04-06 11:17:55 +02:00
Nicola Soranzo
20a4bcd519
Use assertRaisesRegex() to fix new B017 linting errors
...
Fix the following errors reported by flake8-bugbear 21.4.3:
B017 assertRaises(Exception): should be considered evil. It can lead to
your test passing even if the code being tested is never executed due to a
typo. Either assert for a more specific exception (builtin or custom), use
assertRaisesRegex, or use the context manager form of assertRaises.
2021-04-03 20:09:02 +01:00
mvdbeek
dd7aa6ec38
Merge branch 'release_21.01' into dev
2021-02-08 16:01:53 +01:00