Top "Python-unittest" questions

Python's standard library framework for testing.

python - unittest - ImportError: Start directory is not importable

I'm following python unittest to make some test and use discover function to pack tests to a suite. However when …

python python-unittest
Testing Python Decorators?

I'm writing some unit tests for a Django project, and I was wondering if its possible (or necessary?) to test …

python django unit-testing decorator python-unittest
Pytest - error vs fail

Im migrating from PyUnit to Pytest, and I found, that Pytest, unlike PyUnit, does not distinguish fails and errors in …

python testing pytest python-unittest
How to mock data as request.Response type in python

I would like to write some testcase to exercise object_check in isinstance(obj, requests.Response) logic. After I create …

python python-3.x pytest python-unittest python-unittest.mock
Recommended PyUnit tutorials?

What is the best tutorial you know out there for getting started with PyUnit? (On Google I tend to find …

python unit-testing testing python-unittest
Patch over a function imported inside another function

In order to avoid a circular import, I've been forced to define a function that looks like: # do_something.py …

python unit-testing testing mocking python-unittest
how to use assert_frame_equal in unittest

New to unittest package. I'm trying to verify the DataFrame returned by a function through the following code. Even though …

python pandas unit-testing python-unittest
Suppress print output in unittests

Edit: Please notice I'm using Python 2.6 (as tagged) Say I have the following: class Foo: def bar(self): print 'bar' …

python python-2.6 python-unittest
How to make my Python unit tests to import the tested modules if they are in sister folders?

I am still getting my head around the import statement. If I have 2 folders in the same level: src test …

python import directory code-organization python-unittest
What is the difference between unittest, pytest and nose modules?

I'm new in python testing and am having some diffiulties choosing between unittest, pytest and nose nose. I'm bulding a …

python nose pytest python-unittest