4
4
from pathlib import Path
5
5
from subprocess import run
6
6
7
- import parametrize_from_file as pff
8
7
import pytest
9
8
10
9
from devtools import Debug , debug
@@ -62,9 +61,10 @@ def test_print_generator(capsys):
62
61
63
62
64
63
@pytest .mark .parametrize (
65
- ['py_script' , 'stdout' ], [
64
+ ['py_script' , 'stdout' ],
65
+ [
66
66
(
67
- ''' \
67
+ """ \
68
68
from devtools import debug
69
69
70
70
def test_func(v):
@@ -75,18 +75,19 @@ def test_func(v):
75
75
debug(foobar)
76
76
test_func(42)
77
77
print('debug run.')
78
- ''' ,
79
- ''' \
78
+ """ ,
79
+ """ \
80
80
running debug...
81
81
/path/to/test.py:8 <module>
82
82
foobar: 'hello world' (str) len=11
83
83
/path/to/test.py:4 test_func
84
84
'in test func' (str) len=12
85
85
v: 42 (int)
86
86
debug run.
87
- ''' ,
88
- ), (
89
- '''\
87
+ """ ,
88
+ ),
89
+ (
90
+ """\
90
91
from devtools import debug
91
92
92
93
def f(x):
@@ -99,8 +100,8 @@ def g(x):
99
100
x = 42
100
101
debug(x, trace_=True)
101
102
f(x)
102
- ''' ,
103
- ''' \
103
+ """ ,
104
+ """ \
104
105
/path/to/test.py:11 <module>
105
106
x: 42 (int)
106
107
/path/to/test.py:12 <module>
@@ -110,9 +111,10 @@ def g(x):
110
111
/path/to/test.py:5 f
111
112
/path/to/test.py:8 g
112
113
x: 42 (int)
113
- '''
114
- ), (
115
- '''\
114
+ """ ,
115
+ ),
116
+ (
117
+ """\
116
118
from devtools import debug
117
119
118
120
def f(x):
@@ -125,8 +127,8 @@ def g(x):
125
127
x = 42
126
128
print(debug.format(x, trace_=True))
127
129
f(x)
128
- ''' ,
129
- ''' \
130
+ """ ,
131
+ """ \
130
132
/path/to/test.py:11 <module>
131
133
x: 42 (int)
132
134
/path/to/test.py:12 <module>
@@ -136,9 +138,10 @@ def g(x):
136
138
/path/to/test.py:5 f
137
139
/path/to/test.py:8 g
138
140
x: 42 (int)
139
- ''' ,
140
- ), (
141
- '''\
141
+ """ ,
142
+ ),
143
+ (
144
+ """\
142
145
from devtools import debug
143
146
144
147
def f(x):
@@ -151,8 +154,8 @@ def g(x):
151
154
x = 42
152
155
debug.trace(x)
153
156
f(x)
154
- ''' ,
155
- ''' \
157
+ """ ,
158
+ """ \
156
159
/path/to/test.py:11 <module>
157
160
x: 42 (int)
158
161
/path/to/test.py:12 <module>
@@ -162,7 +165,7 @@ def g(x):
162
165
/path/to/test.py:5 f
163
166
/path/to/test.py:8 g
164
167
x: 42 (int)
165
- '''
168
+ """ ,
166
169
),
167
170
],
168
171
)
0 commit comments