I am using py.test and wonder if/how it is possible to retrieve the name of the currently executed test within the setup method that is invoked before running e
How can I get VS Code to put me into the debugger at the point of failure when running tests with pytest? Pytest catches all errors and asserts, and VS code inv
How do I force pytest to show the results in color, even when writing to a pipe? There does not seem to be any command line option to do so.
I am new in automation testing. I am learning automation using selenium with python(page object model). From learning YouTube I see that, log in is done for eve
I have a test suite that I run with python3 -mpytest --log-cli-level=DEBUG ... on the build server. The live logs are useful to troubleshoot if the tests get s
from selenium import webdriver from selenium.webdriver.common.by import By from commonPages.LoginPage import LoginPage from util.InitialSetUp import InitSetup
I'm using the SQLalchemy association-object pattern (http://docs.sqlalchemy.org/en/rel_1_1/orm/basic_relationships.html#association-object) for three model clas
I am new to poetry and want to get it set-up with pytest. I have a package mylib in the following set-up ├── dist │ ├&
I am new to poetry and want to get it set-up with pytest. I have a package mylib in the following set-up ├── dist │ ├&
My project structure mt-kart | --> src/data_kart | | | -->apis | | | -->__init__.py |
I'm working with FastAPI. I've introduced in my test suite (pytest) app.dependency_overrides to test my app dependencies. Strangely enough, when I use it in a t
I have a folder structure like this App --App --app.py --Docs --Tests --test_app.py In my test_app.py file, I have a line to import my app module.
I need to test functions which uses datetime.datetime.now(). What is the easiest way to do this?
I'm interested in using unittest's subTest for looping through some very similar tests. I found that, when I run tests written in this way under pytest (or nos
I want to test an authenticated post request on an API using Pytest. This is what I am doing so far: def test_auth_user_can_create(self, client):
Before I start executing the tests in my Python project, I read some environment variables and set some variables with these values read. My tests will run on t
How can I run my pytests parallely on multiple custom environments ? I have pytest-xdist as well. Not sure if this plugin helps test_test.py @pytest.mark.env(