KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I would to use cProfile module to profile my unit tests. But when I run python -mcProfile mytest.py I got 'Ran 0 tests in 0.000s'. Here is the source code of mytest.py import unittest class TestBasic(unittest.TestCase): def testFoo(self): assert True == True if __name__ == '__main__': unittest.main() I've tested with other more complex unittests as well. Always got 'Ran 0 tests' if I run it with cProfile. Please help. UPDATE: My OS is MacOS 10.7 with built-in python 2.7. The same code works properly on ubuntu.
Tags (comma-separated)
Save Edits
Cancel