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

Error After Installation Of Allure Pytest Adaptor

I am trying to configure Allure (2.6.0) with Pytest (3.6xx) on a Windows 8 box. I am able to run p… Read more Error After Installation Of Allure Pytest Adaptor

Sys.path Including Py.test Rootdir To Make Tests Import Relative To Project Root

I'm having problems with pytest not including my projects rootdir in sys.path list. Instead it … Read more Sys.path Including Py.test Rootdir To Make Tests Import Relative To Project Root

How To Test A Connexion/flask App?

I'm using the Connexion framework for Flask to build a microservice. I would like to write test… Read more How To Test A Connexion/flask App?

Pytest Cannot Find Module On Import But Code Runs Just Fine

The goal is to use the pytest unit test framework for a Python3 project that uses Cython. This is n… Read more Pytest Cannot Find Module On Import But Code Runs Just Fine

Py.test Logging Messages And Test Results/assertions Into A Single File

I am starting to work with py.test at the moment for a new project. We are provisioning Linux serve… Read more Py.test Logging Messages And Test Results/assertions Into A Single File

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 '...'

Py.test : Can Multiple Markers Be Applied At The Test Function Level?

I have seen from the pytest docs that we can apply multiple markers at once on the Class or module … Read more Py.test : Can Multiple Markers Be Applied At The Test Function Level?

Double Parameterization

So I have a set of tests where I'd like to test multiple versions of a solution. Currently I ha… Read more Double Parameterization

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?

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?

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

How To Make Pytest Wait For (manual) User Action?

We are sucessfully using pytest (Python 3) to run a test suite testing some hardware devices (elect… Read more How To Make Pytest Wait For (manual) User Action?

Pytest Teardown_class Is Being Run Too Soon

The Python 'teardown_class' is not behaving as I expect it to. Below is a summary of my cod… Read more Pytest Teardown_class Is Being Run Too Soon

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"

Pytest 2.3 Adding Teardowns Within The Class

I'm researching new version of pytest (2.3) and getting very excited about the new functionalit… Read more Pytest 2.3 Adding Teardowns Within The Class

Can I Patch Python's Assert To Get The Output That Py.test Provides?

Pytest's output for failed asserts is much more informative and useful than the default in Pyth… Read more Can I Patch Python's Assert To Get The Output That Py.test Provides?

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")

Test Calling Of An External Script Run Via Popen That Expects No Available Data In Stdin Using Pytest

I have an external tool with a command line interface that checks whether any data is provided via … Read more Test Calling Of An External Script Run Via Popen That Expects No Available Data In Stdin Using Pytest

Pytest Capture Not Working - Caplog And Capsys Are Empty

I am trying to create unit tests for a logger, but - even though the events are logged - the caplog… Read more Pytest Capture Not Working - Caplog And Capsys Are Empty

How To Pass Testcase Value To Next One With Pytest

import pytest def add(x): return x + 1 def sub(x): return x - 1 testData1 = [1, 2] tes… Read more How To Pass Testcase Value To Next One With Pytest