1515except ImportError :
1616 from io import StringIO
1717
18- 1918LOG_TEST_SIMPLE = r'''^some_meth\(1, 2, 3, a=4\) +<<< .*tests/test_aspectlib_debug.py:\d+:test_simple.*
20- some_meth => \.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\. !"#\$%&\'\(\)\*\+,-\./0123456789:;<=>\?@ABCDEFGHIJKLMNOPQRSTUVWXYZ\[\\\]\^_`abcdefghijklmnopqrstuvwxyz\{\|\}~\.+
19+ some_meth => \.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\. !"#\$%&\'\(\)\*\+,-\./0123456789:;<=>\?@''' \
20+ r'''ABCDEFGHIJKLMNOPQRSTUVWXYZ\[\\\]\^_`abcdefghijklmnopqrstuvwxyz\{\|\}~\.+
2121$'''
2222
2323
@@ -86,9 +86,11 @@ def test_attributes():
8686 ), methods = '(?!bar)(?!__.*__$)' ):
8787 MyStuff ('bar' ).stuff ()
8888 print (buf .getvalue ())
89- assert re .match (r"^\{test_aspectlib_debug.MyStuff foo='bar' bar='foo'\}.stuff\(\) +<<< .*tests/test_aspectlib_debug.py:\d+:test_attributes.*\n\{test_aspectlib_debug.MyStuff foo='bar' bar='foo'\}.stuff => bar\n$" , buf .getvalue ())
89+ assert re .match (r"^\{test_aspectlib_debug.MyStuff foo='bar' bar='foo'\}.stuff\(\) +<<< .*tests/test_aspectlib_debug.py:\d+:"
90+ r"test_attributes.*\n\{test_aspectlib_debug.MyStuff foo='bar' bar='foo'\}.stuff => bar\n$" , buf .getvalue ())
9091 MyStuff ('bar' ).stuff ()
91- assert re .match (r"^\{test_aspectlib_debug.MyStuff foo='bar' bar='foo'\}.stuff\(\) +<<< .*tests/test_aspectlib_debug.py:\d+:test_attributes.*\n\{test_aspectlib_debug.MyStuff foo='bar' bar='foo'\}.stuff => bar\n$" , buf .getvalue ())
92+ assert re .match (r"^\{test_aspectlib_debug.MyStuff foo='bar' bar='foo'\}.stuff\(\) +<<< .*tests/test_aspectlib_debug.py:\d+:"
93+ r"test_attributes.*\n\{test_aspectlib_debug.MyStuff foo='bar' bar='foo'\}.stuff => bar\n$" , buf .getvalue ())
9294
9395
9496def test_no_stack ():
@@ -100,7 +102,8 @@ def test_no_stack():
100102 ), methods = '(?!bar)(?!__.*__$)' ):
101103 MyStuff ('bar' ).stuff ()
102104 print (buf .getvalue ())
103- assert "{test_aspectlib_debug.MyStuff foo='bar' bar='foo'}.stuff()\n {test_aspectlib_debug.MyStuff foo='bar' bar='foo'}.stuff => bar\n " == buf .getvalue ()
105+ assert "{test_aspectlib_debug.MyStuff foo='bar' bar='foo'}.stuff()\n " \
106+ "{test_aspectlib_debug.MyStuff foo='bar' bar='foo'}.stuff => bar\n " == buf .getvalue ()
104107
105108
106109def test_attributes_old_style ():
@@ -112,9 +115,11 @@ def test_attributes_old_style():
112115 ), methods = '(?!bar)(?!__.*__$)' ):
113116 OldStuff ('bar' ).stuff ()
114117 print (repr (buf .getvalue ()))
115- assert re .match (r"^\{test_aspectlib_debug.OldStuff foo='bar' bar='foo'\}.stuff\(\) +<<< .*tests/test_aspectlib_debug.py:\d+:test_attributes.*\n\{test_aspectlib_debug.OldStuff foo='bar' bar='foo'\}.stuff => bar\n$" , buf .getvalue ())
118+ assert re .match (r"^\{test_aspectlib_debug.OldStuff foo='bar' bar='foo'\}.stuff\(\) +<<< .*tests/test_aspectlib_debug.py:\d+:"
119+ r"test_attributes.*\n\{test_aspectlib_debug.OldStuff foo='bar' bar='foo'\}.stuff => bar\n$" , buf .getvalue ())
116120 MyStuff ('bar' ).stuff ()
117- assert re .match (r"^\{test_aspectlib_debug.OldStuff foo='bar' bar='foo'\}.stuff\(\) +<<< .*tests/test_aspectlib_debug.py:\d+:test_attributes.*\n\{test_aspectlib_debug.OldStuff foo='bar' bar='foo'\}.stuff => bar\n$" , buf .getvalue ())
121+ assert re .match (r"^\{test_aspectlib_debug.OldStuff foo='bar' bar='foo'\}.stuff\(\) +<<< .*tests/test_aspectlib_debug.py:\d+:"
122+ r"test_attributes.*\n\{test_aspectlib_debug.OldStuff foo='bar' bar='foo'\}.stuff => bar\n$" , buf .getvalue ())
118123
119124
120125def test_no_stack_old_style ():
@@ -126,7 +131,8 @@ def test_no_stack_old_style():
126131 ), methods = '(?!bar)(?!__.*__$)' ):
127132 OldStuff ('bar' ).stuff ()
128133 print (buf .getvalue ())
129- assert "{test_aspectlib_debug.OldStuff foo='bar' bar='foo'}.stuff()\n {test_aspectlib_debug.OldStuff foo='bar' bar='foo'}.stuff => bar\n " == buf .getvalue ()
134+ assert "{test_aspectlib_debug.OldStuff foo='bar' bar='foo'}.stuff()\n " \
135+ "{test_aspectlib_debug.OldStuff foo='bar' bar='foo'}.stuff => bar\n " == buf .getvalue ()
130136
131137
132138@pytest .mark .skipif (sys .version_info < (2 , 7 ), reason = "No weakref.WeakSet on Python<=2.6" )
0 commit comments