pytest-randomly gives the same “random” result for every test
I’m trying to figure out how to use pytest-randomly
properly, but the problem is I always get the same set of random numbers for every test. All I did was install pytest-randomly
(3.15.0) and run tests normally.
pytest-randomly gives the same “radnom” result for every test
I’m trying to figure out how to use pytest-randomly
properly, but the problem is I always get the same set of random numbers for every test.
All I did was install pytest-randomly
(3.15.0) and run tests normally.
Why isn’t the `pytest_addoption` hook run with the configured `testpaths`?
The necessity to put pytest_addoption in an “initial” conftest.py
:
pytest capfd/capsys/… is not defined
I want to test a functions print output. But even though i have imported pytest it doesnt work
pytestarch rule fails saying that “moduleA” which is imported by “moduleB” using as an aliased relative import is not imported
Label Type: question
Issue Type: Request for clarification
Really call `os.system` from pytest
Apparently, pytest
restricts you from calling os.system
. I develop streamcapture, and the crucial feature is that it captures the stdout
of processes spawned by os.system
, across MacOS, Linux and Windows, so I really need to unit test this capability.
Need help/understanding test functions with pytest
I need help creating test function that can be executed by pytest. I have created one and it passed but I need to test for each function I created and don’t know how to do that. I have tried using assert but all my test fail. I have watch videos on understanding test but I cant seem to grasp on how to use it. I could use your help. Here’s what i have so far…
Why is another function not passable as an argument in a test function without fixtures?
I am learning python and wrote a program to understand about testing code.
how do i make pytest run my expecting test?
I’m unable to make a test that handles when the key value name does not exist:
pytest failing to generate xml correctly
Unable to generate junit xml file correctly, after a failure generation of the file stops and no further tests are executed. The command works without the junit argument. I have also tried adding ‘-o junit_family=xunit1’ but this did not resolve the issue. We are using Python 3.10.6, pytest-8.2.2, but this failed also on pytest 6.2.5.