Skip to content Skip to sidebar Skip to footer
Showing posts with the label Fixtures

Define A Pytest Fixture Providing Multiple Arguments To Test Function

With pytest, I can define a fixture like so: @pytest.fixture def foo(): return 'blah' … Read more Define A Pytest Fixture Providing Multiple Arguments To Test Function

How Can Request.param Be Annotated In Indirect Parametrization?

In the Indirect parametrization example I want to type hint request.param indicating a specific typ… Read more How Can Request.param Be Annotated In Indirect Parametrization?

Can I Parameterize A Pytest Fixture With Other Fixtures?

I have a python test that uses a fixture for credentials (a tuple of userid and password) def test_… Read more Can I Parameterize A Pytest Fixture With Other Fixtures?

In Django, Can You Run Seed Data Without Always Generating A Migration?

I'm using Django and Python 3.7. I have created a YAML file with seed data for my db ... ./mya… Read more In Django, Can You Run Seed Data Without Always Generating A Migration?

Empty Messages In Caplog When Logs Emmited In A Different Process

I am running the test with log_cli=true. The script: import logging import sys from multiprocessing… Read more Empty Messages In Caplog When Logs Emmited In A Different Process

Pytest Parameterized Test With Custom Id Function

I have a parameterized test which takes str, and dict as an argument and so the name look pretty we… Read more Pytest Parameterized Test With Custom Id Function