Created
October 11, 2018 15:20
-
-
Save beam2d/e58e5c5e6e835541acfac407d249489a 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 -s test_foo.py | |
foo 140123586741304 | |
.foo2 140123497640736 | |
. | |
---------------------------------------------------------------------- | |
Ran 2 tests in 0.000s | |
OK | |
del 140123586741304 | |
del 140123497640736 |
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
$ pytest -s testS_foo.py | |
============================= test session starts ============================== | |
platform linux -- Python 3.6.4, pytest-3.5.0, py-1.5.3, pluggy-0.6.0 | |
rootdir: ***, inifile: | |
collected 2 items | |
test_foo.py foo 139935499752336 | |
.del 139935499752336 | |
foo2 139935499752336 | |
.del 139935499752336 | |
=========================== 2 passed in 0.01 seconds =========================== |
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
import unittest | |
class FooTest(unittest.TestCase): | |
def __del__(self): | |
print('del', id(self)) | |
def test_foo(self): | |
print('foo', id(self)) | |
def test_foo2(self): | |
print('foo2', id(self)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment