Skip to content

Commit c2e6e5b

Browse files
committed
Improve error message, fix partial scope
1 parent 9977da2 commit c2e6e5b

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

pandas/io/tests/parser/test_network.py

+7-5
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,17 @@ def __init__(self):
3232

3333
def test_compressed_urls(self):
3434
"""Test reading compressed tables from URL."""
35-
# test_fxn is a workaround for more descriptive nose reporting.
36-
# See http://stackoverflow.com/a/37393684/4651668.
37-
test_fxn = functools.partial(self.check_table)
38-
35+
msg = ('Test reading {}-compressed tables from URL: '
36+
'compression="{}", engine="{}"')
37+
3938
for compression, extension in self.compression_to_extension.items():
4039
url = self.base_url + extension
4140
# args is a (compression, engine) tuple
4241
for args in [(compression, 'python'), ('infer', 'python')]:
43-
test_fxn.description = '{} compression, {} engine'.format(*args)
42+
# test_fxn is a workaround for more descriptive nose reporting.
43+
# See http://stackoverflow.com/a/37393684/4651668.
44+
test_fxn = functools.partial(self.check_table)
45+
test_fxn.description = msg.format(compression, *args)
4446
yield (test_fxn, url) + args
4547

4648
def check_table(self, url, compression, engine):

0 commit comments

Comments
 (0)