11# Test Inform debug functions
22
3- import builtins
4-
53# Imports {{{1
64from inform import Inform , aaa , ccc , ddd , ppp , sss , vvv
75from textwrap import dedent
@@ -14,7 +12,7 @@ def test_anglicize(capsys):
1412 ppp ()
1513 out , err = capsys .readouterr ()
1614 assert out == dedent ('''
17- DEBUG: test_debug.py, 14 , tests.test_debug.test_anglicize()
15+ DEBUG: test_debug.py, 12 , tests.test_debug.test_anglicize()
1816 ''' ).lstrip ()
1917
2018def test_grouch (capsys ):
@@ -24,7 +22,7 @@ def test_grouch(capsys):
2422 ppp ('hey now!' , a , b )
2523 out , err = capsys .readouterr ()
2624 assert out == dedent ('''
27- DEBUG: test_debug.py, 24 , tests.test_debug.test_grouch(): hey now! 0 b
25+ DEBUG: test_debug.py, 22 , tests.test_debug.test_grouch(): hey now! 0 b
2826 ''' ).lstrip ()
2927
3028def test_salver (capsys ):
@@ -38,7 +36,7 @@ def test_salver(capsys):
3836 ddd ('hey now!' , a , b , c , d , e )
3937 out , err = capsys .readouterr ()
4038 assert out == dedent ('''
41- DEBUG: test_debug.py, 38 , tests.test_debug.test_salver():
39+ DEBUG: test_debug.py, 36 , tests.test_debug.test_salver():
4240 'hey now!'
4341 0
4442 'b'
@@ -58,7 +56,7 @@ def test_daiquiri(capsys):
5856 ddd (s = 'hey now!' , a = a , b = b , c = c , d = d , e = e )
5957 out , err = capsys .readouterr ()
6058 assert out == dedent ('''
61- DEBUG: test_debug.py, 58 , tests.test_debug.test_daiquiri():
59+ DEBUG: test_debug.py, 56 , tests.test_debug.test_daiquiri():
6260 a = 0
6361 b = 'b'
6462 c = [0, 'b']
@@ -77,7 +75,7 @@ def test_prude(capsys):
7775 Info (email = 'ted@ledbelly.com' )
7876 out , err = capsys .readouterr ()
7977 assert out == dedent ('''
80- DEBUG: test_debug.py, 73 , tests.test_debug.Info.__init__():
78+ DEBUG: test_debug.py, 71 , tests.test_debug.Info.__init__():
8179 email = 'ted@ledbelly.com'
8280 self = Info object containing {'email': 'ted@ledbelly.com'}
8381 ''' ).lstrip ()
@@ -94,7 +92,7 @@ def test_update(capsys):
9492 out , err = capsys .readouterr ()
9593 out = '\n ' .join (l for l in out .split ('\n ' ) if 'capsys' not in l )
9694 assert out == dedent ('''
97- DEBUG: test_debug.py, 93 , tests.test_debug.test_update():
95+ DEBUG: test_debug.py, 91 , tests.test_debug.test_update():
9896 a = 0
9997 b = 'b'
10098 c = [0, 'b']
@@ -113,7 +111,7 @@ def test_shear(capsys):
113111 vvv (a , b , c , d , e )
114112 out , err = capsys .readouterr ()
115113 assert out == dedent ('''
116- DEBUG: test_debug.py, 113 , tests.test_debug.test_shear():
114+ DEBUG: test_debug.py, 111 , tests.test_debug.test_shear():
117115 a = 0
118116 b = 'b'
119117 c = [0, 'b']
@@ -126,23 +124,23 @@ def test_prostrate(capsys):
126124 sss ()
127125 out , err = capsys .readouterr ()
128126 out = out .strip ().split ('\n ' )
129- assert out [0 ] == 'DEBUG: test_debug.py, 126 , tests.test_debug.test_prostrate():'
130- assert out [- 2 ][- 50 :] == "tests/test_debug.py', line 126 , in test_prostrate,"
127+ assert out [0 ] == 'DEBUG: test_debug.py, 124 , tests.test_debug.test_prostrate():'
128+ assert out [- 2 ][- 50 :] == "tests/test_debug.py', line 124 , in test_prostrate,"
131129 assert out [- 1 ] == ' sss()'
132130
133131def test_rubber (capsys ):
134132 Inform (colorscheme = None , prog_name = False )
135133 a = aaa ('a' )
136134 out , err = capsys .readouterr ()
137135 assert out == dedent ('''
138- DEBUG: test_debug.py, 135 , tests.test_debug.test_rubber(): 'a'
136+ DEBUG: test_debug.py, 133 , tests.test_debug.test_rubber(): 'a'
139137 ''' ).lstrip ()
140138 assert a == 'a'
141139
142140 b = aaa (b = 'b' )
143141 out , err = capsys .readouterr ()
144142 assert out == dedent ('''
145- DEBUG: test_debug.py, 142 , tests.test_debug.test_rubber(): b: 'b'
143+ DEBUG: test_debug.py, 140 , tests.test_debug.test_rubber(): b: 'b'
146144 ''' ).lstrip ()
147145 assert b == 'b'
148146
@@ -152,7 +150,7 @@ def test_bartender(capsys):
152150 ret = aaa (b )
153151 out , err = capsys .readouterr ()
154152 assert out == dedent ('''
155- DEBUG: test_debug.py, 152 , tests.test_debug.test_bartender(): 'b'
153+ DEBUG: test_debug.py, 150 , tests.test_debug.test_bartender(): 'b'
156154 ''' ).lstrip ()
157155 assert ret == 'b'
158156
@@ -161,7 +159,7 @@ def test_scene(capsys):
161159 ccc (msg )
162160 out , err = capsys .readouterr ()
163161 assert out == dedent ('''
164- DEBUG: test_debug.py, 161 , tests.test_debug.test_scene(): Inform
162+ DEBUG: test_debug.py, 159 , tests.test_debug.test_scene(): Inform
165163 ''' ).lstrip ()
166164
167165
0 commit comments