Showing posts with the label pytest

[FIXED] How do I configure PyCharm to run py.test tests?

Issue I want to start writing unit tests for my Python code, and the py.test framework sounds like…

[FIXED] How to remove pytest --no-header --no-summary -q parameters in PyCharm?

Issue I see the parameters for running a default-settings pytest configuration are as follows: La…

[FIXED] py.test does not find tests under a class

Issue I am trying to create test classes that aren't unittest based. This method under this c…

[FIXED] How to use `pytest` from Python?

Issue I'm working in a project that recently switched to the pytest href="https://docs.py…

[FIXED] Lambda handler Context aws_request_id using pytest setup

Issue I can mock event in pytest to test lambda_handler(event, context) but not able to test cont…

[FIXED] Testing with configuration files

Issue my Google-fu has failed me by giving me results I don't understand, so I'm asking her…

[FIXED] Why is the `return_value` for CliRunner().invoke(...) object null?

Issue I'm using click v8.1.3 and I'm trying to create some pytests, but I'm not getting…

[FIXED] How do I read this assertion error for comparing two pandas series?

Issue I'm writing a unit test that tests a the output of a function that makes corrections to v…

[FIXED] Issue with testing Class methods in Pytest

Issue I am trying to run a test in one folder (folder A) calling a class made in a different folder…

[FIXED] Django does not throw ValidationError when required fields are not present

Issue I am currently testing my django model using pytest (and pytest-django), but I can not write …

[FIXED] Python: block network connections for testing purposes?

Issue I'm trying to test a package that provides interfaces to a few web services. It has a te…

[FIXED] Pytest: customize short test summary info, remove filepath

Issue I'm trying to get more useful output from pytest -tb=no short output. I have integration…

[FIXED] How to print AssesrtionError cause Python?

Issue In my code, I'm getting Assertion error. I try to catch it and print out the cause but al…

[FIXED] How to take screenshot on test error using pytest selenium

Issue I have pytest hoook that takes screenshots on test failure. For the tests with failed status…

[FIXED] pytest cant import modules and gives SyntaxError

Issue I am using pytest to test my functions in a directory that looks like this: ├── my_dir ├…

[FIXED] Pytest how to have patch for a function from fixture

Issue i am patching a function from a class. when i directly patch the function in my test code it …

[FIXED] pytest not able to find fixture

Issue #@pytest.fixture() def create_list(): test_strings = ["Walker", "Rio"…

[FIXED] Pytest test failing when run with other tests but passes when run by itself

Issue I very basic test that checks if a user that is not logged in can connect to my websocket tha…

[FIXED] How to call pytest-django from python manage.py test?

Issue I have made my custom management command called pytest_wrp So when I call python manage.py …

[FIXED] Raise_exception not working with token base authentication

Issue I'm trying to run my tests on status codes while i'm not providing token on POST requ…