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

How To Keep Unit Tests And Integrations Tests Separate In Pytest

According to Wikipedia and various articles it is best practice to divide tests into Unit tests (ru… Read more How To Keep Unit Tests And Integrations Tests Separate In Pytest

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

Transitive Import Error: Modulenotfounderror: No Module Named '...'

I'm confused now. Here is the project tree: project - source - - lib - - - __init__.py - - - u… Read more Transitive Import Error: Modulenotfounderror: No Module Named '...'

Repeat A Test Upon An Assertionerror

There is the module pytest-repeat which can be used to repeat the execution of pytest N times (the … Read more Repeat A Test Upon An Assertionerror

Running Unit Tests In Parallel With Pytest?

How can I parallelize the execution of the unit tests written with pytest? Which tactics of paralle… Read more Running Unit Tests In Parallel With Pytest?

Can Pytest Be Made To Fail If Nothing Is Asserted?

Today I had a failing test that happily succeeded, because I forgot a rather important line at the … Read more Can Pytest Be Made To Fail If Nothing Is Asserted?

Writing A Pytest Function For Checking The Output On Console (stdout)

This link gives a description how to use pytest for capturing console outputs. I tried on this foll… Read more Writing A Pytest Function For Checking The Output On Console (stdout)

Pytest Modulenotfounderror

Even for as long as I've worked in Python, I still occasionally run into issues with my package… Read more Pytest Modulenotfounderror