Skip to main content
Filter by
Sorted by
Tagged with
0 votes
1 answer
54 views

Using pytest, I can make a single unit test fail if the body of the test wrote anything to stdout or stderr with something like: import pytest def test_no_stray_output(capsys: pytest.CaptureFixture[...
zwol's user avatar
  • 143k
Advice
0 votes
0 replies
39 views

I am integrating pytest-recording into an existing Python project in order to record HTTP interactions during tests. Pytest-recording is built on vcr.py pytest-recording uses the @pytest.mark.vcr ...
Rimsha Chaudhry's user avatar
0 votes
0 answers
25 views

My team is porting to Allure 2 to report our tests. Our pytest tests have a bunch of attributes that I have implemented as allure tags. In the report page, when I click on a single test on the left ...
Chris Sontag's user avatar
Advice
0 votes
0 replies
19 views

We have some JavaScript Playwright tests, and they use a configuration that includes a global script 'timeout' value, and you can also set other timeouts in this config. So, in the playwright.config....
Aracknid416's user avatar
Best practices
0 votes
2 replies
38 views

I want to group all test files in one directory called tests, but if i nest my tests when I run pytest I get an error because it can't load the function sum, which is inside the module lib, which is ...
optimusfrenk's user avatar
  • 1,321
2 votes
1 answer
107 views

There is nice documentation for how to tell Playwright to retry tests using Node.js, but I can't find anything on how to do so with Python/Pytest. The closest solution I can find is pytest-...
Peter's user avatar
  • 25
1 vote
1 answer
93 views

I'm using FastAPI with SQLAlchemy 2.0 (Async). I want to follow the best practice of wrapping my route logic in transactions. However, I'm struggling to make this work with my Pytest suite where I use ...
Tserediani's user avatar
0 votes
1 answer
28 views

I want to use pytest hooks like pytest_assertion_pass. The workflow here for test execution is: Another Python module run_test.py imports test.py and calls execute(). I cannot change that behavior. ...
schussda's user avatar
0 votes
1 answer
128 views

Using dependencies = [ "pytest>=9.0.2", "pytest-playwright", ] in a Python application I am setting a a browser end to end test. I have defined custom markers: [tool.pytest....
k0pernikus's user avatar
  • 67.8k
Advice
0 votes
2 replies
26 views

I really struggle with pytest's automagic definition of arguments for individual tests. For example, I have this test where I am mocking an external api call: def test_valid_type(monkeypatch): ...
charmingduchess's user avatar
0 votes
0 answers
78 views

I have been trying hard to test my PySpark transformation on my local Windows machine. Here is what I have done so far. I installed the latest version of Spark, downloaded hadoop.dll and winutils, ...
Rishabh's user avatar
  • 88
Best practices
0 votes
1 replies
85 views

A simple scenario to illustrate the core issue. My project requires the user to provide a configuration file in YAML format. I provide a sample configuration file, for example: env: dev cpu: 1 mem: ...
Marcello Romani's user avatar
1 vote
2 answers
108 views

An instance of class A starts a sub-process that calls a method of an instance of class B. It works as expected in real-life, but unit tests fail because the mock object replacing the object of class ...
Cutter's user avatar
  • 1,881
0 votes
1 answer
205 views

With the AI answers, I was recommended to do: [tool.hatch.envs.hatch-test] dev-mode = false # This is the line recommended by AI to have it installed instead of having it editable/local use mode ...
Cyber Avater's user avatar
  • 2,100
0 votes
1 answer
162 views

Hello i am new on nicegui, i create a simple app where i need to upload the files and store this files on ftp server. I start to make some tests with nicegui.testing.User (i use this package because i ...
Youcef's user avatar
  • 1

15 30 50 per page
1
2 3 4 5
702