Results for pytest
I'm developing a library, and I'm using hypothesis to test it. I usually sketch out a (buggy) implementation of a function, implement tests, then iter...
I am new to Python and testing, I have a huge problem with my Python testing. So in a folder, I have two other folders one which contains the main cod...
After a test has been executed I need to collect the result of that test. But I don't find the result in the FixtureRequest object. I can find the tes...
I have this files. main.py util.py mocking_util.py test_main.py I'd like to use mocking_util.py instead of util.py in test code. I know mocker.patch...
First of all, sorry for the title, I couldn't think of something better. The code below is fictitious because the real code where this is happening is...
I find myself frequently using the following pattern for pytest fixtures: @pytest.fixture() def make_stuff(fix1, fix2): def _fn(arg1, arg2): ...
I am aware of pytest's decorators to mark tests as to be skipped (conditionally). However, all those are evaluated before the test starts. I have a co...
I have a list of functions that return Boolean values. It's all called like this: for f in functions: if f(): pass I am writing tests and ...
I've come across a testing challenge in my Python project and I'm hoping to get some insights from the community. I have a utility module containing a...
I'm currently working on a Flask application that utilizes Flask-RESTful to create an API, and it's working perfectly when I run it. However, when try...
I would like to use Playwright for Python in a non-privileged environment. After running pip install pytest-playwright in the embedded python environm...
I am trying to mock a simple function but I get an AttributeError and have no clue on how to fix it. def my_function(): return "original" def moc...
I have a pytest.ini file that has the following contents [pytest] testpaths = tests/database/* tests/* addopts = -v --cov="merlot" --cov="merlot/sql"...
I am using selenium, pytest, splinter and gherkins, I have a test case where I want to mock the browser actual location and timezone. I tried many app...
The Coverage tool supports generating code coverage data from Pytest tests with coverage run -m pytest .... However, there is also the Pytest-Cov plug...
I'm creating small educational app using fastapi and aiopg for connectioon to db. It remains to write only the tests. I try to use pytest-asyncio and ...
I'm new to pytest, I'm using python 10. I want to parameterize two dictionaries that have the same keys with different values but I want to check if ...
I got 3 tests in django using pytest, the first two tests are alright untill third one which cannot find Template. Last 2 of 3 are working with same t...
I have a test script I am using to validate whether or not my requests to the Slack API (using the Slack SDK for python) are valid or not. If the test...
Is there a way to share a temporary folder just across the tests in class? This pytest doc mentions the function-scoped tmp_path and session-scoped tm...
I am trying to run a test using pytest environment within a python script. I need the parameter called config which is defined in script.py to be used...
I am trying to use parameterized fixture in my pytest-bdd framework. Normal fixture works fine. But If I am passing parameters, it gives below error T...
I am trying to use pytest and mocker to test a python package that I am writing. This is the outline of my repo (assuming package is called hoopla) h...
In pytest-django there is a builtin fixture live_server though it seems like this server (that is actually based on LiveServerTestCase) can't handle w...
Presently I am using pytest, django and rabbitmq-server with celery for background tasks I do notice however that when I run pytest without running t...
How do I undo the most recent local commits in Git?
How can I remove a specific item from an array in JavaScript?
How do I delete a Git branch locally and remotely?
How can I find all files containing a specific text (string) on Linux?
How to find all files containing specific text (string) on Linux?
How do I revert a Git repository to a previous commit?
How do I create an HTML button that acts like a link?
How do I check out a remote Git branch?