##// END OF EJS Templates
Also run test with Pytest....
Also run test with Pytest. This now run many of the tests using pytest. Many of previous pull-requests brought pytest compatibility; this now actually would run a passing test suite. This does not mean we can drop nose; in particular we still have plugins fro doctests using iptest; which pytest does not run; and we are still limited to pytest 3 (pytest 4 does not support yield-test anymore) There is thus still much work to do.

File last commit:

r22963:2961b531
r25117:ea4ab3aa
Show More
tclass.py
34 lines | 921 B | text/x-python | PythonLexer
"""Simple script to be run *twice*, to check reference counting bugs.
See test_run for details."""
import sys
# We want to ensure that while objects remain available for immediate access,
# objects from *previous* runs of the same script get collected, to avoid
# accumulating massive amounts of old references.
class C(object):
def __init__(self,name):
self.name = name
self.p = print
self.flush_stdout = sys.stdout.flush
def __del__(self):
self.p('tclass.py: deleting object:',self.name)
self.flush_stdout()
try:
name = sys.argv[1]
except IndexError:
pass
else:
if name.startswith('C'):
c = C(name)
#print >> sys.stderr, "ARGV:", sys.argv # dbg
# This next print statement is NOT debugging, we're making the check on a
# completely separate process so we verify by capturing stdout:
print('ARGV 1-:', sys.argv[1:])
sys.stdout.flush()