The installation of the pytest-asyncio package should not affect this.
Last active
March 8, 2024 11:25
-
-
Save cdleonard/941dd2df169561cc96b3cb4ab1890cf0 to your computer and use it in GitHub Desktop.
Check compatibility between pytest-asyncio and --doctest-ignore-import-error
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
print("import baddepmod") | |
import baddep |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
services: | |
fail: | |
build: | |
context: . | |
dockerfile: Dockerfile.fail | |
volumes: | |
- "./:/workdir" | |
working_dir: /workdir | |
pass: | |
build: | |
context: . | |
dockerfile: Dockerfile.pass | |
volumes: | |
- "./:/workdir" | |
working_dir: /workdir |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM python:alpine | |
RUN pip install pytest pytest-asyncio |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM python:alpine | |
RUN pip install pytest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def test_add(): | |
assert 1 + 1 == 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
docker compose run --rm --build pass pytest --co | |
docker compose run --rm --build fail pytest --co |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[tool:pytest] | |
minversion = 6 | |
addopts = | |
--capture=no | |
--doctest-modules | |
--doctest-ignore-import-errors |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment