Commit 1e54ccd
committed
fix: tests to run under pytest
Fix tests to run fully under pytest, this includes:
- Fixing filenames, removing dots and correct typos
- Removing __init__ methods, which are not supported by pytest
- Implement parametrisation so tests can be run individually
- Added timeouts so tests can't run forever
- Replacing print and logging with assertions to prevent false successes
- Removing unused and add missing imports
- Mark tests with @pytest.mark.asyncio where appropriate
- Use http constants to avoid magic numbers
- Add type hints to improve linting and identify issues
- Use local server for API tests to improve debugging and eliminate
docker dependency
- Call pytest in __main__ to allow running tests from command line
- Skip broken tests
- Fix out of date logic and invalid method parameters
- Re-enable disabled and commented out tests after fixing them
- Added missing test data
- Updated tests that depend on altered external css or html structure
- Automatically skip if tests if API key is not set
If you need to debug a test, which will take time, you will need to
comment out the default timeout in pyproject.toml under
[tool.pytest.ini_options].1 parent e57cc16 commit 1e54ccd
File tree
73 files changed
+5271
-4712
lines changed- tests
- 20241401
- async
- data
- browser
- docker
- cli
- docker
- hub
- legacy
- loggers
- memory
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
73 files changed
+5271
-4712
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
103 | 103 | | |
104 | 104 | | |
105 | 105 | | |
| 106 | + | |
106 | 107 | | |
107 | 108 | | |
108 | 109 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
| 5 | + | |
4 | 6 | | |
5 | 7 | | |
6 | 8 | | |
7 | | - | |
| 9 | + | |
8 | 10 | | |
9 | 11 | | |
10 | | - | |
| 12 | + | |
11 | 13 | | |
12 | 14 | | |
13 | | - | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
14 | 18 | | |
15 | 19 | | |
16 | 20 | | |
17 | 21 | | |
18 | 22 | | |
19 | 23 | | |
20 | 24 | | |
| 25 | + | |
21 | 26 | | |
22 | 27 | | |
23 | 28 | | |
24 | 29 | | |
25 | 30 | | |
26 | 31 | | |
| 32 | + | |
27 | 33 | | |
28 | 34 | | |
29 | 35 | | |
| |||
35 | 41 | | |
36 | 42 | | |
37 | 43 | | |
| 44 | + | |
| 45 | + | |
38 | 46 | | |
39 | 47 | | |
40 | 48 | | |
41 | 49 | | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
42 | 56 | | |
43 | | - | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
44 | 60 | | |
45 | 61 | | |
46 | | - | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
Lines changed: 33 additions & 26 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
2 | 6 | | |
3 | 7 | | |
4 | | - | |
5 | | - | |
6 | 8 | | |
| 9 | + | |
7 | 10 | | |
8 | | - | |
| 11 | + | |
| 12 | + | |
9 | 13 | | |
10 | 14 | | |
11 | 15 | | |
12 | 16 | | |
13 | | - | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
14 | 28 | | |
15 | 29 | | |
16 | 30 | | |
| |||
27 | 41 | | |
28 | 42 | | |
29 | 43 | | |
30 | | - | |
31 | | - | |
| 44 | + | |
| 45 | + | |
32 | 46 | | |
33 | 47 | | |
34 | 48 | | |
35 | 49 | | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
54 | 59 | | |
55 | 60 | | |
56 | | - | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
0 commit comments