inducer / inducer/pudb

Unit tests are not running

Open
#113 5 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
3.2k
Forks
245
Avg merge
13m
Merged PRs (30d)
5

Description

I've ran into a weird problem trying to debug a unit test with pudb.
Basically, the tests run fine with the python interpreter, but no tests run when using the pudb debugger.

I've written a small test case that isolates the problem:

```
class Math:
def pow(self, x, y):
return x ** y

import unittest
class MathTest(unittest.TestCase):
def testPow23(self):
self.assertEquals(8, Math().pow(2, 3))
def testPow24(self):
self.assertEquals(16, Math().pow(2, 4))

if __name__ == '__main__':
unittest.main()
```

Putting into a file named `amodule.py` and running with the python interpreter, the two tests run fine:

```
$ python amodule.py
.
----------------------------------------------------------------------
Ran 2 tests in 0.001s

OK
```

However, running through `pudb amodule.py`, no tests are ran -- this is the output:

```
----------------------------------------------------------------------
Ran 0 tests in 0.000s

OK
```

Is this a bug?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.