Last active
August 29, 2015 13:56
-
-
Save graingert/9048955 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ nosetests test_stuff.py | |
E.E | |
====================================================================== | |
ERROR: test_assert_true (test_stuff.TestFail) | |
---------------------------------------------------------------------- | |
Traceback (most recent call last): | |
File "/home/vagrant/test_stuff.py", line 17, in test_assert_true | |
raise Exception | |
Exception | |
====================================================================== | |
ERROR: test_stuff.test_dotup | |
---------------------------------------------------------------------- | |
Traceback (most recent call last): | |
File "/opt/hogarth/envs/redacted/dev/local/lib/python2.7/site-packages/nose/case.py", line 197, in runTest | |
self.test(*self.arg) | |
File "/home/vagrant/test_stuff.py", line 7, in test_dotup | |
raise Exception | |
Exception | |
---------------------------------------------------------------------- | |
Ran 3 tests in 0.005s | |
FAILED (errors=2) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ nosetests test_stuff.py --attr="flop" | |
E | |
====================================================================== | |
ERROR: test_assert_true (test_stuff.TestFail) | |
---------------------------------------------------------------------- | |
Traceback (most recent call last): | |
File "/home/vagrant/test_stuff.py", line 17, in test_assert_true | |
raise Exception | |
Exception | |
---------------------------------------------------------------------- | |
Ran 1 test in 0.003s | |
FAILED (errors=1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ nosetests test_stuff.py --attr="!flop" | |
-bash: !flop: event not found |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ nosetests test_stuff.py --attr="\!flop" | |
---------------------------------------------------------------------- | |
Ran 0 tests in 0.000s | |
OK |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ nosetests test_stuff.py --eval-attr="not flop" | |
E.E | |
====================================================================== | |
ERROR: test_assert_true (test_stuff.TestFail) | |
---------------------------------------------------------------------- | |
Traceback (most recent call last): | |
File "/home/vagrant/test_stuff.py", line 17, in test_assert_true | |
raise Exception | |
Exception | |
====================================================================== | |
ERROR: test_stuff.test_dotup | |
---------------------------------------------------------------------- | |
Traceback (most recent call last): | |
File "/opt/hogarth/envs/zonza/dev/local/lib/python2.7/site-packages/nose/case.py", line 197, in runTest | |
self.test(*self.arg) | |
File "/home/vagrant/test_stuff.py", line 7, in test_dotup | |
raise Exception | |
Exception | |
---------------------------------------------------------------------- | |
Ran 3 tests in 0.003s | |
FAILED (errors=2) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vagrant@vagrant-zonza-webapp-bork:~$ nosetests test_stuff.py --attr='!tup' | |
E. | |
====================================================================== | |
ERROR: test_assert_true (test_stuff.TestFail) | |
---------------------------------------------------------------------- | |
Traceback (most recent call last): | |
File "/home/vagrant/test_stuff.py", line 17, in test_assert_true | |
raise Exception | |
Exception | |
---------------------------------------------------------------------- | |
Ran 2 tests in 0.005s | |
FAILED (errors=1) | |
vagrant@vagrant-zonza-webapp-bork:~$ nosetests test_stuff.py --attr='!flop' | |
E.E | |
====================================================================== | |
ERROR: test_assert_true (test_stuff.TestFail) | |
---------------------------------------------------------------------- | |
Traceback (most recent call last): | |
File "/home/vagrant/test_stuff.py", line 17, in test_assert_true | |
raise Exception | |
Exception | |
====================================================================== | |
ERROR: test_stuff.test_dotup | |
---------------------------------------------------------------------- | |
Traceback (most recent call last): | |
File "/opt/hogarth/envs/zonza/dev/local/lib/python2.7/site-packages/nose/case.py", line 197, in runTest | |
self.test(*self.arg) | |
File "/home/vagrant/test_stuff.py", line 7, in test_dotup | |
raise Exception | |
Exception | |
---------------------------------------------------------------------- | |
Ran 3 tests in 0.005s | |
FAILED (errors=2) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from nose.plugins.attrib import attr | |
from unittest import TestCase | |
@attr("tup") | |
def test_dotup(): | |
raise Exception | |
class TestThings(TestCase): | |
def test_assert_true(self): | |
assert(True) | |
@attr("flop") | |
class TestFail(TestThings): | |
def test_assert_true(self): | |
raise Exception |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment