Skip to content

Commit 0d082c6

Browse files
committed
TST: nicer output from pd.test()
TST: skip result2 test in computation/test_eval.py as unreliable TST: skip some unreliable tests in io/tests/test_data.py Author: Jeff Reback <[email protected]> Closes pandas-dev#12568 from jreback/tests and squashes the following commits: 41c8584 [Jeff Reback] TST: nicer output from pd.test()
1 parent 14cf67f commit 0d082c6

File tree

3 files changed

+41
-2
lines changed

3 files changed

+41
-2
lines changed

pandas/computation/tests/test_eval.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1633,8 +1633,8 @@ def test_result_types(self):
16331633
self.check_result_type(np.float64, np.float64)
16341634

16351635
def test_result_types2(self):
1636-
# xref https://github.com/pydata/pandas/issues/12293
1637-
tm._skip_if_windows()
1636+
# xref https://github.com/pydata/pandas/issues/12293
1637+
raise nose.SkipTest("unreliable tests on complex128")
16381638

16391639
# Did not test complex64 because DataFrame is converting it to
16401640
# complex128. Due to https://github.com/pydata/pandas/issues/10952

pandas/io/tests/test_data.py

+2
Original file line numberDiff line numberDiff line change
@@ -304,6 +304,7 @@ def setUpClass(cls):
304304
super(TestYahooOptions, cls).setUpClass()
305305
_skip_if_no_lxml()
306306
_skip_if_no_bs()
307+
raise nose.SkipTest('unreliable test')
307308

308309
# aapl has monthlies
309310
cls.aapl = web.Options('aapl', 'yahoo')
@@ -370,6 +371,7 @@ def test_get_expiry_dates(self):
370371

371372
@network
372373
def test_get_all_data(self):
374+
373375
try:
374376
data = self.aapl.get_all_data(put=True)
375377
except RemoteDataError as e:

pandas/util/nosetester.py

+37
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,43 @@ def _get_custom_doctester(self):
122122
"""
123123
return None
124124

125+
def _test_argv(self, label, verbose, extra_argv):
126+
''' Generate argv for nosetest command
127+
128+
Parameters
129+
----------
130+
label : {'fast', 'full', '', attribute identifier}, optional
131+
see ``test`` docstring
132+
verbose : int, optional
133+
Verbosity value for test outputs, in the range 1-10. Default is 1.
134+
extra_argv : list, optional
135+
List with any extra arguments to pass to nosetests.
136+
137+
Returns
138+
-------
139+
argv : list
140+
command line arguments that will be passed to nose
141+
'''
142+
argv = [__file__, self.package_path]
143+
if label and label != 'full':
144+
if not isinstance(label, string_types):
145+
raise TypeError('Selection label should be a string')
146+
if label == 'fast':
147+
label = 'not slow and not network and not disabled'
148+
argv += ['-A', label]
149+
argv += ['--verbosity', str(verbose)]
150+
151+
# When installing with setuptools, and also in some other cases, the
152+
# test_*.py files end up marked +x executable. Nose, by default, does
153+
# not run files marked with +x as they might be scripts. However, in
154+
# our case nose only looks for test_*.py files under the package
155+
# directory, which should be safe.
156+
argv += ['--exe']
157+
158+
if extra_argv:
159+
argv += extra_argv
160+
return argv
161+
125162
def test(self, label='fast', verbose=1, extra_argv=None,
126163
doctests=False, coverage=False, raise_warnings=None):
127164
"""

0 commit comments

Comments
 (0)