Skip to content

Instantly share code, notes, and snippets.

@m-kuhn
Last active May 4, 2018 14:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save m-kuhn/bde1e4e668900adc1a60f23c83a0578f to your computer and use it in GitHub Desktop.
Save m-kuhn/bde1e4e668900adc1a60f23c83a0578f to your computer and use it in GitHub Desktop.
[unittest]
plugins = nose2.plugins.logcapture
[log-capture]
always-on = True
clear-handlers = True
log-level = NOTSET
$ nose2
test a
Ftest b
.
======================================================================
FAIL: test_a (test_nose.TestExport)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/mku/dev/nosetesttest/test_nose.py", line 8, in test_a
    self.assertTrue(False)
AssertionError: False is not true

----------------------------------------------------------------------
Ran 2 tests in 0.000s

FAILED (failures=1)
# -*- coding: utf-8 -*-
import nose2
import unittest
class TestExport(unittest.TestCase):
def test_a(self):
print('test a')
self.assertTrue(False)
def test_b(self):
print('test b')
self.assertTrue(True)
if __name__ == '__main__':
nose2.main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment