You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This method verifies if there are test files in a directory before adding the pytest task to run tests on that directory. This is needed
16
+
This method verifies if there are test files in a directory before adding the pytest task to run tests on that directory. This is needed
17
17
because if there are no tests in that dir and we run pytest on it, it exits with exit code 5 which gradle takes to mean that the process
18
18
failed, since it's non-zero. This means that if a module doesn't need a unit or integration test, it still needs to add a dummy test file
19
-
like:
20
-
19
+
like:
20
+
21
21
```
22
22
def make_ci_pass_test():
23
23
assert True
24
24
```
25
-
25
+
26
26
So we use this method to leverage pytest's test discovery rules (https://docs.pytest.org/en/6.2.x/goodpractices.html#conventions-for-python-test-discovery)
27
-
to selectively run pytest based on whether there seem to be test files in that directory.
28
-
Namely, if the directory contains a file whose name is test_*.py or *_test.py then it's a test.
29
-
27
+
to selectively run pytest based on whether there seem to be test files in that directory.
28
+
Namely, if the directory contains a file whose name is test_*.py or *_test.py then it's a test.
29
+
30
30
See https://github.com/airbytehq/airbyte/issues/4979 for original context
0 commit comments