Loading python/pytest.yml +1 −1 Original line number Diff line number Diff line Loading @@ -9,7 +9,7 @@ python:pytest: PYTEST_COVERAGE_THRESHOLD: "25" INSTALL_PYTEST_PLUGINS: "pytest-asyncio pytest-xdist" # See https://docs.pytest.org/en/latest/reference/plugin_list.html CHECK_PATH: "./${PYTHON_PACKAGE}" DEFAULT_ARGS: "-vvv --capture=tee-sys" DEFAULT_ARGS: "-vvv --capture=tee-sys -o log_cli=true -o log_cli_level=DEBUG --color=yes" EXTRA_ARGS: "" # Set optional arguments script: - pip install pytest pytest-cov ${INSTALL_PYTEST_PLUGINS} Loading templates_tests/python/tests/test_mymodule.py +9 −0 Original line number Diff line number Diff line Loading @@ -2,9 +2,18 @@ I can even make docstrings here! I'm awesome. """ import logging from mypackage import mymodule logger = logging.getLogger(__name__) def test_myfunction(): """Testing always makes me joyful.""" logger.debug("We're in the function now, amazing! This is a debug message.") logger.info("You should know about this INFOrmational message!") logger.warning("Be warned, things may get hairy now.") logger.error("Ah, an error, we screwed up.") logger.critical("Lord o lord, it's critical. But we must move on.") assert mymodule.myfunction(variable=3) == 11 Loading
python/pytest.yml +1 −1 Original line number Diff line number Diff line Loading @@ -9,7 +9,7 @@ python:pytest: PYTEST_COVERAGE_THRESHOLD: "25" INSTALL_PYTEST_PLUGINS: "pytest-asyncio pytest-xdist" # See https://docs.pytest.org/en/latest/reference/plugin_list.html CHECK_PATH: "./${PYTHON_PACKAGE}" DEFAULT_ARGS: "-vvv --capture=tee-sys" DEFAULT_ARGS: "-vvv --capture=tee-sys -o log_cli=true -o log_cli_level=DEBUG --color=yes" EXTRA_ARGS: "" # Set optional arguments script: - pip install pytest pytest-cov ${INSTALL_PYTEST_PLUGINS} Loading
templates_tests/python/tests/test_mymodule.py +9 −0 Original line number Diff line number Diff line Loading @@ -2,9 +2,18 @@ I can even make docstrings here! I'm awesome. """ import logging from mypackage import mymodule logger = logging.getLogger(__name__) def test_myfunction(): """Testing always makes me joyful.""" logger.debug("We're in the function now, amazing! This is a debug message.") logger.info("You should know about this INFOrmational message!") logger.warning("Be warned, things may get hairy now.") logger.error("Ah, an error, we screwed up.") logger.critical("Lord o lord, it's critical. But we must move on.") assert mymodule.myfunction(variable=3) == 11