Skip to content Skip to sidebar Skip to footer
Showing posts with the label Pytest

Pytest - Patched Method Of A Class Does Not Return The Mock Value

My code is fairly simple but i don't understand what is going on : class MyDb : def some_fun… Read more Pytest - Patched Method Of A Class Does Not Return The Mock Value

Filenotfounderror When Using Python -m Pytest Vs. Pytest

I recently changed the IDE I am using to VSCode. For the most part I like it, but there is one part… Read more Filenotfounderror When Using Python -m Pytest Vs. Pytest

How Can I Unittest Whether Pdf Files Have Been Generated Correctly?

I write a small python library that uses matplotlib and seaborn to draw charts, and I wonder how I … Read more How Can I Unittest Whether Pdf Files Have Been Generated Correctly?

Can Pytest Be Made To Fail If Nothing Is Asserted?

Today I had a failing test that happily succeeded, because I forgot a rather important line at the … Read more Can Pytest Be Made To Fail If Nothing Is Asserted?

Getting A "can't Pickle Local Object 'liveservertestcase'" Error When Trying To Use Liveservertestcase To Test Flask App

I am getting the error mentioned in the title once trying to run a unittest on my Flask app using L… Read more Getting A "can't Pickle Local Object 'liveservertestcase'" Error When Trying To Use Liveservertestcase To Test Flask App

Getting Error Typeerror: 'module' Object Has No Attribute '__getitem__'

I am trying to write py.test based test cases. my test.py is !flask/bin/python import pytest impo… Read more Getting Error Typeerror: 'module' Object Has No Attribute '__getitem__'

Flask Unit Testing - How To Reset App.url_map For Each Test?

I'm writing a series of unit tests for a Flask app. The setup for each test is as follows: Cre… Read more Flask Unit Testing - How To Reset App.url_map For Each Test?

Making Pytest Quieter When Run From Pycharm

UPDATE: The messages shown below are NOT controlled by pytest various '-q' quiet options. … Read more Making Pytest Quieter When Run From Pycharm