Skip to content

TST: nicer output from pd.test() #12568

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pandas/computation/tests/test_eval.py
Original file line number Diff line number Diff line change
Expand Up @@ -1633,8 +1633,8 @@ def test_result_types(self):
self.check_result_type(np.float64, np.float64)

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

# Did not test complex64 because DataFrame is converting it to
# complex128. Due to https://github.com/pydata/pandas/issues/10952
Expand Down
2 changes: 2 additions & 0 deletions pandas/io/tests/test_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,7 @@ def setUpClass(cls):
super(TestYahooOptions, cls).setUpClass()
_skip_if_no_lxml()
_skip_if_no_bs()
raise nose.SkipTest('unreliable test')

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

@network
def test_get_all_data(self):

try:
data = self.aapl.get_all_data(put=True)
except RemoteDataError as e:
Expand Down
37 changes: 37 additions & 0 deletions pandas/util/nosetester.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,43 @@ def _get_custom_doctester(self):
"""
return None

def _test_argv(self, label, verbose, extra_argv):
''' Generate argv for nosetest command

Parameters
----------
label : {'fast', 'full', '', attribute identifier}, optional
see ``test`` docstring
verbose : int, optional
Verbosity value for test outputs, in the range 1-10. Default is 1.
extra_argv : list, optional
List with any extra arguments to pass to nosetests.

Returns
-------
argv : list
command line arguments that will be passed to nose
'''
argv = [__file__, self.package_path]
if label and label != 'full':
if not isinstance(label, string_types):
raise TypeError('Selection label should be a string')
if label == 'fast':
label = 'not slow and not network and not disabled'
argv += ['-A', label]
argv += ['--verbosity', str(verbose)]

# When installing with setuptools, and also in some other cases, the
# test_*.py files end up marked +x executable. Nose, by default, does
# not run files marked with +x as they might be scripts. However, in
# our case nose only looks for test_*.py files under the package
# directory, which should be safe.
argv += ['--exe']

if extra_argv:
argv += extra_argv
return argv

def test(self, label='fast', verbose=1, extra_argv=None,
doctests=False, coverage=False, raise_warnings=None):
"""
Expand Down