PATH issue with pytest ‘ImportError: No module named YadaYadaYada’
I used easy_install to install pytest on a mac and started writing tests for a project with a file structure likes so:
I used easy_install to install pytest on a mac and started writing tests for a project with a file structure likes so:
I’m trying to understand what conftest.py
files are meant to be used for.
Using pytest.raises
function
I am using py.test to test some DLL code wrapped in a python class MyTester.
For validating purpose I need to log some test data during the tests and do more processing afterwards. As I have many test_… files I want to reuse the tester object creation (instance of MyTester) for most of my tests.
pytest recommends including an additional directory to separate the source code within a project:
I have a console program written in Python. It asks the user questions using the command:
I am using pytest. I have two files in a directory. In one of the files there is a long running test case that generates some output. In the other file there is a test case that reads that output. How can I ensure the proper execution order of the two test cases? Is there any alternative other than puting the test cases in the same file in the proper order?
I am writing a pytest plugin that should test software that’s designed to work inside a set of specific environments.
I’m creating the test cases for web-tests using Jenkins, Python, Selenium2(webdriver) and Py.test frameworks.
Often I’ll write a test class that uses a pytest fixture in every method. Here’s an example. I’d like to be able to avoid having to write the fixture name in the signature of every method. It’s not DRY. How can this be done?