unittest2 Questions

4

Solved

Python's unittest discover does not find my tests! I have been using nose to discover my unit tests and it is working fine. From the top level of my project, if I run nosetests I get: Ran 31 test...
Ferric asked 23/2, 2011 at 9:20

3

Solved

In previous version of Nose testing framework, there were several ways to specify only a subset of all tests: nosetests test.module nosetests another.test:TestCase.test_method nosetests a.test:Tes...
Figwort asked 26/7, 2013 at 20:4

3

This is a problem that came up when performing a single test that had multiple independent failure modes, due to having multiple output streams. I also wanted to show the results of asserting the d...
Blowing asked 22/3, 2012 at 19:40

2

Solved

I was looking at similar questions and I couldn't find an answer to my problem. I wrote Tests in a python class that derives from unittest.TestCase class TestEffortFormula(unittest.TestCase) I ...
Saavedra asked 17/5, 2015 at 11:14

7

Solved

I'm trying to figure out how to get python setup.py test to run the equivalent of python -m unittest discover. I don't want to use a run_tests.py script and I don't want to use any external test to...
Fiester asked 8/6, 2013 at 15:27

1

I am trying to implement a full and clean way of testing python packages, one that would suit the folowing requirements: execute tests on clean machines without setting them up (virtualenv) gathe...
Fasciation asked 17/4, 2013 at 12:34

4

How can you get unittest2 and coverage.py working together? In theory something like coverage run unit2 discover should work, but it currently just errors out. If you are a nose user that wil...
Lowenstern asked 22/7, 2010 at 19:8

1

Solved

Here's the section of PEP8 that describes how function names should be: Function names should be lowercase, with words separated by underscores as necessary to improve readability. mixedCase...
Trickster asked 9/6, 2013 at 22:25

2

Solved

I'm unit testing classes in Python using unittest. As I understand it, unittest calls the setUp function before each test so that the state of the unit test objects are the same and the order the t...
Annora asked 8/7, 2012 at 9:15

2

Solved

In test.py, I am trying to import test_data: import unittest2 import re from test_data import receipt1_example test_data.py is in the same directory as test.py. I get the following error: /U...
Coble asked 3/5, 2012 at 18:56

2

Solved

I have a decorator and I want to assert that certain methods in my code are decorated with it. import functools def decorator(func): def _check_something(*args, **kwargs): # some logic in here ...
Aboriginal asked 4/4, 2012 at 13:30
1

© 2022 - 2024 — McMap. All rights reserved.