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

How To Create New Log File For Each Run Of Tests In Pytest?

I have created a pytest.ini file, addopts = --resultlog=log.txt This creates a log file, but I wou… Read more How To Create New Log File For Each Run Of Tests In Pytest?

Py.test -n => "py.test: Error: Unrecognized Arguments: -n"

I am trying to distribute django tests to multiple processes to speed up test runs. I am using py.t… Read more Py.test -n => "py.test: Error: Unrecognized Arguments: -n"

Change Pytest Working Directory To Test Case Directory

I have the following pytest directory structure: system_tests/ ├── conftest ├── pytest.ini │ … Read more Change Pytest Working Directory To Test Case Directory

Calling Function That Yields From A Pytest Fixture

In my unit tests, I have two very similar fixtures, and I was hoping to break out some of the funct… Read more Calling Function That Yields From A Pytest Fixture

In Pytest, How Can I Figure Out If A Test Failed? (from "request")

I'm using Selenium with PYTEST to test a site. I would like to take a screenshot of the page wh… Read more In Pytest, How Can I Figure Out If A Test Failed? (from "request")

Pytest : Cannot Mock __init__ Of My Class

I am having a custom Db class, which has the basic operations. I am trying to write tests around it… Read more Pytest : Cannot Mock __init__ Of My Class

Why A Fatal Python Error When Testing Using Pytest-qt?

My first test using pytest-qt failed immediately with a Fatal Python error. I reduced the code to … Read more Why A Fatal Python Error When Testing Using Pytest-qt?

How Can I Access Al The Markers In A Pytest Fixture?

I'm using pytest and I want to tag my tests with markers which will specify to a fixture which … Read more How Can I Access Al The Markers In A Pytest Fixture?