Coming from a .Net background I am trying to understand python multithreading using concurrent.futures.ThreadPoolExecutor and submit. I was trying to ...
Coming from a .Net background I am trying to understand python multithreading using concurrent.futures.ThreadPoolExecutor and submit. I was trying to ...
Below is the full test code where each assertion is executed. This is unintuitive for me for one reason. If the value of the variable k is None then t ...
So to be specific, we're using SqlAlchemy and session, and we use define it only once at say, at utils/sessions.py. like following : and we use thi ...
I am using pandas read_csv() function to read some CSV content and want to use "high" or "round_trip" floating-point precision. The following works i ...
I am attempting to unit test some methods called by a flask application. The methods interact with a flask Response object, which I am trying to mock ...
I am developing automated tests for one of our GUI based app using Pytest framework. I've created a docker image with series of tests for a particular ...
I am a little confused about fixture scope in pytest. Say I have a fixture and a test function My understanding is that in this case, the genera ...
Currently learning Python to automate API and faced the first significant issue I found no solution for. When I try to run my test either with Run or ...
I am attempting to run a series of tests for a python project in PyCharm and have been running into os.environ[] KeyErrors near non-stop the last few ...
I am working on a pytest-framework that will be packed as a package. The setup file i am using for this is as this: In this package (in the root of ...
Consider a fixture like @pytest.fixture def mock_database(monkeypatch: MonkeyPatch) -> None: ... And it's use in a test def test_with_mock_ ...
According to the official documentation, it is possible to mark tests with custom markers that have positional or keyword arguments. For instance: @p ...
I am trying to have working tests for an API written with FastAPI. I start the service in a separate process, run the tests with requests to the serv ...
I have python3 and pip3 installed. I also install pytest but when I enter the command pytest, it does not work. It shows me the following: <zsh: c ...
Here's my command : Here's the output: I can see only see [gw0] & [gw1] that are passed in the output and I can't run it for [gw2]&[gw3] ...
I would like to use a "helper" decorator in multiple pytest test files: Which is the best place for min311? It is not imported automatically from c ...
I am using pytest to test my django rest framework API and am gettin gan error on the following test: traceback in pytest is as follows: I dont ...
I have a function in my code that is being used by fastapi to provide a db session to the endpoints: I want to use the same function as a pytest fi ...
I would like to assert that an expression equals some boolean value: However, pylint suggests to use is or 'not' instead of ==: Comparison 'res ...
I have a database handler that utilizes SQLAlchemy ORM to communicate with a database. As part of SQLAlchemy's recommended practices, I interact with ...