@@ -17,8 +17,8 @@ def test_print(capsys):
1717 print (stdout )
1818 assert re .sub (':\d{2,}' , ':<line no>' , stdout ) == (
1919 'tests/test_main.py:<line no> test_print\n '
20- ' a: 1 (int)\n '
21- ' b: 2 (int)\n '
20+ ' a: 1 (int)\n '
21+ ' b: 2 (int)\n '
2222 )
2323 assert stderr == ''
2424
@@ -31,8 +31,8 @@ def test_format():
3131 print (repr (s ))
3232 assert s == (
3333 "tests/test_main.py:<line no> test_format\n "
34- " a: b'i might bite' (bytes) len=12\n "
35- " b: 'hello this is a test' (str) len=20"
34+ " a: b'i might bite' (bytes) len=12\n "
35+ " b: 'hello this is a test' (str) len=20"
3636 )
3737
3838
@@ -57,10 +57,10 @@ def test_func(v):
5757 assert p .stdout .replace (str (f ), '/path/to/test.py' ) == (
5858 "running debug...\n "
5959 "/path/to/test.py:8 <module>\n "
60- " foobar: 'hello world' (str) len=11\n "
60+ " foobar: 'hello world' (str) len=11\n "
6161 "/path/to/test.py:4 test_func\n "
62- " 'in test func' (str) len=12\n "
63- " v: 42 (int)\n "
62+ " 'in test func' (str) len=12\n "
63+ " v: 42 (int)\n "
6464 "debug run.\n "
6565 )
6666
@@ -70,7 +70,7 @@ def test_odd_path(mocker):
7070 mocked_relative_to = mocker .patch ('pathlib.Path.relative_to' )
7171 mocked_relative_to .side_effect = ValueError ()
7272 v = debug .format ('test' )
73- assert re .search ("/.*?/test_main.py:\d{2,} test_odd_path\n 'test' \(str\) len=4" , str (v )), v
73+ assert re .search ("/.*?/test_main.py:\d{2,} test_odd_path\n 'test' \(str\) len=4" , str (v )), v
7474
7575
7676def test_small_call_frame ():
@@ -82,9 +82,9 @@ def test_small_call_frame():
8282 )
8383 assert re .sub (':\d{2,}' , ':<line no>' , str (v )) == (
8484 'tests/test_main.py:<line no> test_small_call_frame\n '
85- ' 1 (int)\n '
86- ' 2 (int)\n '
87- ' 3 (int)'
85+ ' 1 (int)\n '
86+ ' 2 (int)\n '
87+ ' 3 (int)'
8888 )
8989
9090
@@ -98,9 +98,9 @@ def test_small_call_frame_warning():
9898 )
9999 assert re .sub (':\d{2,}' , ':<line no>' , str (v )) == (
100100 'tests/test_main.py:<line no> test_small_call_frame_warning\n '
101- ' 1 (int)\n '
102- ' 2 (int)\n '
103- ' 3 (int)'
101+ ' 1 (int)\n '
102+ ' 2 (int)\n '
103+ ' 3 (int)'
104104 )
105105
106106
@@ -112,8 +112,8 @@ def test_kwargs():
112112 print (s )
113113 assert s == (
114114 "tests/test_main.py:<line no> test_kwargs\n "
115- " first: 'variable' (str) len=8 variable=a\n "
116- " second: 'literal' (str) len=7"
115+ " first: 'variable' (str) len=8 variable=a\n "
116+ " second: 'literal' (str) len=7"
117117 )
118118
119119
@@ -124,8 +124,8 @@ def test_kwargs_orderless():
124124 s = re .sub (':\d{2,}' , ':<line no>' , str (v ))
125125 assert set (s .split ('\n ' )) == {
126126 "tests/test_main.py:<line no> test_kwargs_orderless" ,
127- " first: 'variable' (str) len=8 variable=a" ,
128- " second: 'literal' (str) len=7" ,
127+ " first: 'variable' (str) len=8 variable=a" ,
128+ " second: 'literal' (str) len=7" ,
129129 }
130130
131131
@@ -134,9 +134,9 @@ def test_simple_vars():
134134 s = re .sub (':\d{2,}' , ':<line no>' , str (v ))
135135 assert s == (
136136 "tests/test_main.py:<line no> test_simple_vars\n "
137- " 'test' (str) len=4\n "
138- " 1 (int)\n "
139- " 2 (int)"
137+ " 'test' (str) len=4\n "
138+ " 1 (int)\n "
139+ " 2 (int)"
140140 )
141141 r = re .sub (':\d{2,}' , ':<line no>' , repr (v ))
142142 assert r == (
@@ -153,23 +153,23 @@ class Bar:
153153
154154 b = Bar ()
155155 v = debug .format (b .y .x )
156- assert 'test_attributes\n b.y.x: 1 (int)' in str (v )
156+ assert 'test_attributes\n b.y.x: 1 (int)' in str (v )
157157
158158
159159def test_eval ():
160160 with pytest .warns (RuntimeWarning ):
161161 v = eval ('debug.format(1)' )
162162
163- assert str (v ) == '<string>:1 <module>\n 1 (int)'
163+ assert str (v ) == '<string>:1 <module>\n 1 (int)'
164164
165165
166166def test_warnings_disabled ():
167167 debug_ = Debug (warnings = False )
168168 with pytest .warns (None ) as warnings :
169169 v1 = eval ('debug_.format(1)' )
170- assert str (v1 ) == '<string>:1 <module>\n 1 (int)'
170+ assert str (v1 ) == '<string>:1 <module>\n 1 (int)'
171171 v2 = debug_ .format (1 )
172- assert 'test_warnings_disabled\n 1 (int)' in str (v2 )
172+ assert 'test_warnings_disabled\n 1 (int)' in str (v2 )
173173 assert len (warnings ) == 0
174174
175175
@@ -180,8 +180,8 @@ def test_eval_kwargs():
180180
181181 assert str (v ) == (
182182 "<string>:1 <module>\n "
183- " 1 (int)\n "
184- " apple: 'pear' (str) len=4"
183+ " 1 (int)\n "
184+ " apple: 'pear' (str) len=4"
185185 )
186186
187187
@@ -196,8 +196,8 @@ def test_exec(capsys):
196196 stdout , stderr = capsys .readouterr ()
197197 assert stdout == (
198198 '<string>:3 <module>\n '
199- ' 2 (int)\n '
200- ' 3 (int)\n '
199+ ' 2 (int)\n '
200+ ' 3 (int)\n '
201201 )
202202 assert stderr == ''
203203
@@ -215,7 +215,7 @@ def test_inspect_error(mocker):
215215 mocked_getouterframes .side_effect = IndexError ()
216216 with pytest .warns (SyntaxWarning ):
217217 v = debug .format ('x' )
218- assert str (v ) == "<unknown>:0 \n 'x' (str) len=1"
218+ assert str (v ) == "<unknown>:0 \n 'x' (str) len=1"
219219
220220
221221def test_breakpoint (mocker ):
0 commit comments