Top "Python-unittest" questions

Python's standard library framework for testing.

Python mock call_args_list unpacking tuples for assertion on arguments

I'm having some trouble dealing with the nested tuple which Mock.call_args_list returns. def test_foo(self): def …

python unit-testing python-unittest python-unittest.mock
Persist variable changes between tests in unittest?

How do I persist changes made within the same object inheriting from TestCase in unitttest? from unittest import TestCase, main …

python unit-testing persistence testcase python-unittest
Pycharm and unittest does not work

I have a problem with PYCharm 3.0.1 I can't run basic unittests. Here is my code : import unittest from MysqlServer import …

python pycharm python-unittest
How to assert a dict contains another dict without assertDictContainsSubset in python?

I know assertDictContainsSubset can do this in python 2.7, but for some reason it's deprecated in python 3.2. So is there any …

python python-2.7 python-3.x python-unittest
How to achieve assertDictEqual with assertSequenceEqual applied to values

I know that, when performing assertEqual on a dictionary, assertDictEqual is called. Similarly, assertEqual on a sequence will perform assertSequenceEqual. …

python unit-testing python-unittest
How to test Python 3.4 asyncio code?

What's the best way to write unit tests for code using the Python 3.4 asyncio library? Assume I want to test …

python unit-testing python-3.x python-unittest python-asyncio
How do I run multiple Python test cases in a loop?

I am new to Python and trying to do something I do often in Ruby. Namely, iterating over a set …

python python-unittest
Python unittest.TestCase object has no attribute 'runTest'

For the following code: import unittest class Test(unittest.TestCase): def test1(self): assert(True == True) if __name__ == "__main__": suite = …

python unit-testing python-3.x python-unittest
unittest installation error Could not find a version that satisfies the requirement

Could someone please help me with this error message: Could not find a version that satisfies the requirement unittest I …

python python-unittest
ImportError: cannot import name wraps

I'm using python 2.7.6 on Ubuntu 14.04.2 LTS. I'm using mock to mock some unittests and noticing when I import mock it …

python mocking python-unittest