How do I configure PyCharm to run py.test tests?
I want to start writing unit tests for my Python code, and the py.test framework sounds like a better bet than Python’s bundled … Read more
I want to start writing unit tests for my Python code, and the py.test framework sounds like a better bet than Python’s bundled … Read more
I am using selenium for end to end testing and I can’t get how to use setup_class and teardown_class methods. I need to … Read more
I am using py.test to test some DLL code wrapped in a python class MyTester. For validating purpose I need to log some … Read more
I am working on a package in Python. I use virtualenv. I set the path to the root of the module in a … Read more
How to do assert almost equal with py.test for floats without resorting to something like: assert x – 0.00001 <= y <= x … Read more
I used easy_install to install pytest on a mac and started writing tests for a project with a file structure likes so: repo/ … Read more
I’m trying to use TDD (test-driven development) with pytest. pytest will not print to the console when I use print. I am using … Read more
I recently discovered pytest. It seems great. However, I feel the documentation could be better. I’m trying to understand what conftest.py files are … Read more
Is there a way to select pytest tests to run from a file? For example, a file foo.txt containing a list of tests … Read more
Code: # coding=utf-8 import pytest def whatever(): return 9/0 def test_whatever(): try: whatever() except ZeroDivisionError as exc: pytest.fail(exc, pytrace=True) Output: ================================ test session … Read more