Open alex-astronomer opened 1 year ago
Not solving the problem, but a workaround we found:
echo -e '[pytest]\naddopts = -m "not integration"' > pytest.ini
astro dev pytest
Not an expert in go
, but I think it could be solved by replacing this line by something similar to this snippet.
Describe the bug
When trying to run
astro dev pytest
and passing a custom marker in the args for the underlyingpytest
command, I receive an error that no file was found for my marker.Results in error message:
Running with command
pytest -m "not integration"
Correctly runs the tests, skipping any tests that are marked with
@pytest.mark.integration
.What CLI Version did you experience this bug?
1.15.1
This CLI bug is related to which Astronomer Platform?
What Operating System is the above CLI installed on?
macOS Ventura 13.4
🪜 Steps To Reproduce
Create 2 tests, one marked with integration and one without.
Running this test with
pytest -m "not integration"
should run successfully. This should skip one test, and run one test. This shows in the output of thepytest
command with running withastro
CLI.Then, run these tests as part of an Airflow Astro repository project.
Running the command
astro dev pytest -a "-m \"not integration\""
results in an error likeERROR: file or directory not found: integration"
.