Skip to content Skip to sidebar Skip to footer
Showing posts with the label Unit Testing

Django Test Suite Url Coverage

I'd like to make sure that my Django test suite covers all URLs listed in my URL configuration.… Read more Django Test Suite Url Coverage

How To Run The Same Test-case For Different Classes?

I have several classes that share some invariants and have a common interface, and I would like to … Read more How To Run The Same Test-case For Different Classes?

Run Python Unit Test With Python 2.7 And 3.x

I run my python unit tests by executing my test file through the shell and invoking if __name__ == … Read more Run Python Unit Test With Python 2.7 And 3.x

Mocked Unit Test Raises A "stop Called On Unstarted Patcher" Error

When running the test bellow, I got a stop called on unstarted patcher. def test_get_subvention_int… Read more Mocked Unit Test Raises A "stop Called On Unstarted Patcher" Error

How To Unit Test 'mkdir' Function Without File System Access?

I use py.test for unit testing. I have something just like this: Class Site(object): def set_p… Read more How To Unit Test 'mkdir' Function Without File System Access?

Mocking Python Class In Unit Test And Verifying An Instance

I'm trying to unit test an SFTP helper class that makes some calls to the pysftp module. I want… Read more Mocking Python Class In Unit Test And Verifying An Instance

Pytest : Cannot Mock __init__ Of My Class

I am having a custom Db class, which has the basic operations. I am trying to write tests around it… Read more Pytest : Cannot Mock __init__ Of My Class

How To Properly Use Coverage.py In Python?

I've just started using Coverage.py module and so decided to make a simple test to check how it… Read more How To Properly Use Coverage.py In Python?