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

Maintaining Order Of Test Execution When Parametrizing Tests In Test Class

I am trying to parametrize my tests like below @pytest.mark.parametrize('a,b', test_data) c… Read more Maintaining Order Of Test Execution When Parametrizing Tests In Test Class

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 Can I Structure My Folders To Test My Code:

I'm working on a project and would like to write some unit tests for my code. Here is a minima… Read more How Can I Structure My Folders To Test My Code:

Py.test With Xdist Is Not Executing Tests Parametrized With Random Values

Does anybody noticed the following strange behaviour for pytest and xdist. When trying to run the t… Read more Py.test With Xdist Is Not Executing Tests Parametrized With Random Values

Py.test Method To Be Executed Only Once Per Run

Im new to pytest(and python). In have set of things to be executed only once before all my tests(ex… Read more Py.test Method To Be Executed Only Once Per Run

Monkeypatching Not Carrying Through Class Import

I'm trying to test some code using pytest and need to change a function from some module. One o… Read more Monkeypatching Not Carrying Through Class Import

Py.test Does Not Start (ebusy: [resource Device])

Just installed py.test with pip install -U pytest with no errors, however we I'm trying to laun… Read more Py.test Does Not Start (ebusy: [resource Device])

Setting Command Line Arguments For Main Function Tests

I have a main() function in python that gets command line arguments. Is there a way for me to write… Read more Setting Command Line Arguments For Main Function Tests