Menu
  • HOME
  • TAGS

How to run existing tests on a python lib cloned form github?

python,unit-testing,pyunit

Since the test module doesn't have a main execution, you need a collector to run the tests. You also have to run the collector at the root of your repository so that python can find the module you're testing. For instance, you could run: ~/OX3-Python-API-Client$ python -m unittest tests Or...

Python unittest: Run multiple assertions in a loop without failing at first one, but continue

python,unit-testing,testing,assertions,pyunit

How about something like this? def test_folders(self): tfolders = glob.iglob(os.environ['testdir'] + '/test_*') failures = [] for testpath in tfolders: testname = os.path.basename(testpath) if not self.runTest(testname): failures.append[testname] self.assertEqual([], failures) ...

Django Tests run faster with no internet connection

python,django,testing,pyunit

This most likely means you've got some component installed which is trying to make network connections. Possibly something that does monitoring or statistics gathering? The simplest way to figure out what's going on is to use tcpdump to capture your network traffic and see what's going on. To do that:...