Skip to content

Instantly share code, notes, and snippets.

@jaraco
Created September 21, 2020 14:47
Show Gist options
  • Save jaraco/98e892c863326df60c6d7c45d97175c2 to your computer and use it in GitHub Desktop.
Save jaraco/98e892c863326df60c6d7c45d97175c2 to your computer and use it in GitHub Desktop.
trial-retry $ cat test_sample.py
# test_sample.py
import unittest
class DemoTest(unittest.TestCase):
def test_passes(self):
pass
def test_fails(self):
self.fail("I failed.")
trial-retry $ trial test_sample.py
test_sample
py ... [ERROR]
===============================================================================
[ERROR]
Traceback (most recent call last):
File "/Users/jaraco/.local/pipx/venvs/twisted/lib/python3.8/site-packages/twisted/trial/runner.py", line 823, in loadByName
return self.suiteFactory([self.findByName(name, recurse=recurse)])
File "/Users/jaraco/.local/pipx/venvs/twisted/lib/python3.8/site-packages/twisted/trial/runner.py", line 752, in findByName
obj = reflect.namedAny(name)
File "/Users/jaraco/.local/pipx/venvs/twisted/lib/python3.8/site-packages/twisted/python/reflect.py", line 315, in namedAny
raise ObjectNotFound('%r does not name an object' % (name,))
twisted.python.reflect.ObjectNotFound: 'test_sample.py' does not name an object
test_sample.py
-------------------------------------------------------------------------------
Ran 1 tests in 0.018s
FAILED (errors=1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment