@@ -113,7 +113,7 @@ def __exit__(self, exc_type, exc_val, exc_tb):
113
113
114
114
def test_script_from_stdin_to_stdout ():
115
115
"""Command line utility: read from stdin, print to stdout"""
116
- cmd = [sys .executable , "tabulate.py" ]
116
+ cmd = [sys .executable , "tabulate/__init__ .py" ]
117
117
out = run_and_capture_stdout (cmd , input = sample_input ())
118
118
expected = SAMPLE_SIMPLE_FORMAT
119
119
print ("got: " , repr (out ))
@@ -126,7 +126,7 @@ def test_script_from_file_to_stdout():
126
126
with TemporaryTextFile () as tmpfile :
127
127
tmpfile .write (sample_input ())
128
128
tmpfile .seek (0 )
129
- cmd = [sys .executable , "tabulate.py" , tmpfile .name ]
129
+ cmd = [sys .executable , "tabulate/__init__ .py" , tmpfile .name ]
130
130
out = run_and_capture_stdout (cmd )
131
131
expected = SAMPLE_SIMPLE_FORMAT
132
132
print ("got: " , repr (out ))
@@ -142,7 +142,7 @@ def test_script_from_file_to_file():
142
142
input_file .seek (0 )
143
143
cmd = [
144
144
sys .executable ,
145
- "tabulate.py" ,
145
+ "tabulate/__init__ .py" ,
146
146
"-o" ,
147
147
output_file .name ,
148
148
input_file .name ,
@@ -165,7 +165,7 @@ def test_script_from_file_to_file():
165
165
def test_script_header_option ():
166
166
"""Command line utility: -1, --header option"""
167
167
for option in ["-1" , "--header" ]:
168
- cmd = [sys .executable , "tabulate.py" , option ]
168
+ cmd = [sys .executable , "tabulate/__init__ .py" , option ]
169
169
raw_table = sample_input (with_headers = True )
170
170
out = run_and_capture_stdout (cmd , input = raw_table )
171
171
expected = SAMPLE_SIMPLE_FORMAT_WITH_HEADERS
@@ -178,7 +178,7 @@ def test_script_header_option():
178
178
def test_script_sep_option ():
179
179
"""Command line utility: -s, --sep option"""
180
180
for option in ["-s" , "--sep" ]:
181
- cmd = [sys .executable , "tabulate.py" , option , "," ]
181
+ cmd = [sys .executable , "tabulate/__init__ .py" , option , "," ]
182
182
raw_table = sample_input (sep = "," )
183
183
out = run_and_capture_stdout (cmd , input = raw_table )
184
184
expected = SAMPLE_SIMPLE_FORMAT
@@ -190,7 +190,14 @@ def test_script_sep_option():
190
190
def test_script_floatfmt_option ():
191
191
"""Command line utility: -F, --float option"""
192
192
for option in ["-F" , "--float" ]:
193
- cmd = [sys .executable , "tabulate.py" , option , ".1e" , "--format" , "grid" ]
193
+ cmd = [
194
+ sys .executable ,
195
+ "tabulate/__init__.py" ,
196
+ option ,
197
+ ".1e" ,
198
+ "--format" ,
199
+ "grid" ,
200
+ ]
194
201
raw_table = sample_input ()
195
202
out = run_and_capture_stdout (cmd , input = raw_table )
196
203
expected = SAMPLE_GRID_FORMAT_WITH_DOT1E_FLOATS
@@ -202,7 +209,7 @@ def test_script_floatfmt_option():
202
209
def test_script_format_option ():
203
210
"""Command line utility: -f, --format option"""
204
211
for option in ["-f" , "--format" ]:
205
- cmd = [sys .executable , "tabulate.py" , "-1" , option , "grid" ]
212
+ cmd = [sys .executable , "tabulate/__init__ .py" , "-1" , option , "grid" ]
206
213
raw_table = sample_input (with_headers = True )
207
214
out = run_and_capture_stdout (cmd , input = raw_table )
208
215
expected = SAMPLE_GRID_FORMAT_WITH_HEADERS
0 commit comments