mirror of
https://github.com/boostorg/python.git
synced 2026-01-22 17:32:55 +00:00
This commit was manufactured by cvs2svn to create branch 'mpl_v2'.
[SVN r14323]
This commit is contained in:
30
test/back_reference.py
Normal file
30
test/back_reference.py
Normal file
@@ -0,0 +1,30 @@
|
||||
'''
|
||||
>>> from back_reference_ext import *
|
||||
>>> y = Y(3)
|
||||
>>> z = Z(4)
|
||||
>>> x_instances()
|
||||
2
|
||||
>>> y2 = copy_Y(y)
|
||||
>>> x_instances()
|
||||
3
|
||||
>>> z2 = copy_Z(z)
|
||||
>>> x_instances()
|
||||
4
|
||||
>>> y_identity(y) is y
|
||||
1
|
||||
>>> y_equality(y, y)
|
||||
1
|
||||
'''
|
||||
|
||||
def run(args = None):
|
||||
import sys
|
||||
import doctest
|
||||
|
||||
if args is not None:
|
||||
sys.argv = args
|
||||
return doctest.testmod(sys.modules.get(__name__))
|
||||
|
||||
if __name__ == '__main__':
|
||||
print "running..."
|
||||
import sys
|
||||
sys.exit(run()[0])
|
||||
Reference in New Issue
Block a user