Skip to content

Commit

Permalink
TST: Change nose.runmodule to pytest
Browse files Browse the repository at this point in the history
  • Loading branch information
TomAugspurger committed Oct 26, 2016
1 parent 144df0f commit cd9bf8f
Show file tree
Hide file tree
Showing 99 changed files with 293 additions and 226 deletions.
6 changes: 3 additions & 3 deletions pandas/api/tests/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,6 @@ def test_deprecation_access_obj(self):
pd.datetools.monthEnd

if __name__ == '__main__':
import nose
nose.runmodule(argv=[__file__, '-vvs', '-x', '--pdb', '--pdb-failure'],
exit=False)
import pytest

pytest.main([__file__, '-vvs', '-x', '--pdb'])
5 changes: 3 additions & 2 deletions pandas/computation/tests/test_compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,5 +65,6 @@ def testit():


if __name__ == '__main__':
nose.runmodule(argv=[__file__, '-vvs', '-x', '--pdb', '--pdb-failure'],
exit=False)
import pytest

pytest.main([__file__, '-vvs', '-x', '--pdb'])
5 changes: 3 additions & 2 deletions pandas/computation/tests/test_eval.py
Original file line number Diff line number Diff line change
Expand Up @@ -1972,5 +1972,6 @@ def test_negate_lt_eq_le():


if __name__ == '__main__':
nose.runmodule(argv=[__file__, '-vvs', '-x', '--pdb', '--pdb-failure'],
exit=False)
import pytest

pytest.main([__file__, '-vvs', '-x', '--pdb'])
6 changes: 3 additions & 3 deletions pandas/core/frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -5768,6 +5768,6 @@ def boxplot(self, column=None, by=None, ax=None, fontsize=None, rot=0,
ops.add_special_arithmetic_methods(DataFrame, **ops.frame_special_funcs)

if __name__ == '__main__':
import nose
nose.runmodule(argv=[__file__, '-vvs', '-x', '--pdb', '--pdb-failure'],
exit=False)
import pytest

pytest.main([__file__, '-vvs', '-x', '--pdb'])
5 changes: 3 additions & 2 deletions pandas/io/tests/json/test_json_norm.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,5 +226,6 @@ def test_nested_flattens(self):
self.assertEqual(result, expected)

if __name__ == '__main__':
nose.runmodule(argv=[__file__, '-vvs', '-x', '--pdb',
'--pdb-failure', '-s'], exit=False)
import pytest

pytest.main([__file__, '-vvs', '-x', '--pdb'])
5 changes: 3 additions & 2 deletions pandas/io/tests/json/test_pandas.py
Original file line number Diff line number Diff line change
Expand Up @@ -1013,5 +1013,6 @@ def roundtrip(s, encoding='latin-1'):


if __name__ == '__main__':
nose.runmodule(argv=[__file__, '-vvs', '-x', '--pdb',
'--pdb-failure', '-s'], exit=False)
import pytest

pytest.main([__file__, '-vvs', '-x', '--pdb'])
5 changes: 3 additions & 2 deletions pandas/io/tests/json/test_ujson.py
Original file line number Diff line number Diff line change
Expand Up @@ -1614,5 +1614,6 @@ def _clean_dict(d):


if __name__ == '__main__':
nose.runmodule(argv=[__file__, '-vvs', '-x', '--pdb', '--pdb-failure'],
exit=False)
import pytest

pytest.main([__file__, '-vvs', '-x', '--pdb'])
5 changes: 3 additions & 2 deletions pandas/io/tests/parser/test_network.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,5 +187,6 @@ def test_s3_fails(self):
read_csv('s3://cant_get_it/')

if __name__ == '__main__':
nose.runmodule(argv=[__file__, '-vvs', '-x', '--pdb', '--pdb-failure'],
exit=False)
import pytest

pytest.main([__file__, '-vvs', '-x', '--pdb'])
5 changes: 3 additions & 2 deletions pandas/io/tests/parser/test_parsers.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,5 +98,6 @@ def read_table(self, *args, **kwds):
return read_table(*args, **kwds)

if __name__ == '__main__':
nose.runmodule(argv=[__file__, '-vvs', '-x', '--pdb', '--pdb-failure'],
exit=False)
import pytest

pytest.main([__file__, '-vvs', '-x', '--pdb'])
5 changes: 3 additions & 2 deletions pandas/io/tests/parser/test_textreader.py
Original file line number Diff line number Diff line change
Expand Up @@ -398,5 +398,6 @@ def assert_array_dicts_equal(left, right):
assert(np.array_equal(v, right[k]))

if __name__ == '__main__':
nose.runmodule(argv=[__file__, '-vvs', '-x', '--pdb', '--pdb-failure'],
exit=False)
import pytest

pytest.main([__file__, '-vvs', '-x', '--pdb'])
5 changes: 3 additions & 2 deletions pandas/io/tests/parser/test_unsupported.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,5 +150,6 @@ def test_deprecated_args(self):
**kwargs)

if __name__ == '__main__':
nose.runmodule(argv=[__file__, '-vvs', '-x', '--pdb', '--pdb-failure'],
exit=False)
import pytest

pytest.main([__file__, '-vvs', '-x', '--pdb'])
5 changes: 3 additions & 2 deletions pandas/io/tests/test_date_converters.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,5 +139,6 @@ def date_parser(date, time):
assert_frame_equal(df, df_correct)

if __name__ == '__main__':
nose.runmodule(argv=[__file__, '-vvs', '-x', '--pdb', '--pdb-failure'],
exit=False)
import pytest

pytest.main([__file__, '-vvs', '-x', '--pdb'])
5 changes: 3 additions & 2 deletions pandas/io/tests/test_excel.py
Original file line number Diff line number Diff line change
Expand Up @@ -2277,5 +2277,6 @@ def check_called(func):


if __name__ == '__main__':
nose.runmodule(argv=[__file__, '-vvs', '-x', '--pdb', '--pdb-failure'],
exit=False)
import pytest

pytest.main([__file__, '-vvs', '-x', '--pdb'])
5 changes: 3 additions & 2 deletions pandas/io/tests/test_ga.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,5 +194,6 @@ def test_segment(self):


if __name__ == '__main__':
nose.runmodule(argv=[__file__, '-vvs', '-x', '--pdb', '--pdb-failure'],
exit=False)
import pytest

pytest.main([__file__, '-vvs', '-x', '--pdb'])
5 changes: 3 additions & 2 deletions pandas/io/tests/test_gbq.py
Original file line number Diff line number Diff line change
Expand Up @@ -1138,5 +1138,6 @@ def test_upload_data_as_service_account_with_key_contents(self):
self.assertEqual(result['NUM_ROWS'][0], test_size)

if __name__ == '__main__':
nose.runmodule(argv=[__file__, '-vvs', '-x', '--pdb', '--pdb-failure'],
exit=False)
import pytest

pytest.main([__file__, '-vvs', '-x', '--pdb'])
5 changes: 3 additions & 2 deletions pandas/io/tests/test_html.py
Original file line number Diff line number Diff line change
Expand Up @@ -920,5 +920,6 @@ def test_same_ordering():
assert_framelist_equal(dfs_lxml, dfs_bs4)

if __name__ == '__main__':
nose.runmodule(argv=[__file__, '-vvs', '-x', '--pdb', '--pdb-failure'],
exit=False)
import pytest

pytest.main([__file__, '-vvs', '-x', '--pdb'])
6 changes: 3 additions & 3 deletions pandas/io/tests/test_pickle.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,6 @@ def test_pickle_v0_15_2(self):


if __name__ == '__main__':
nose.runmodule(argv=[__file__, '-vvs', '-x', '--pdb', '--pdb-failure'],
# '--with-coverage', '--cover-package=pandas.core'],
exit=False)
import pytest

pytest.main([__file__, '-vvs', '-x', '--pdb'])
6 changes: 3 additions & 3 deletions pandas/io/tests/test_pytables.py
Original file line number Diff line number Diff line change
Expand Up @@ -5455,6 +5455,6 @@ def _test_sort(obj):


if __name__ == '__main__':
import nose
nose.runmodule(argv=[__file__, '-vvs', '-x', '--pdb', '--pdb-failure'],
exit=False)
import pytest

pytest.main([__file__, '-vvs', '-x', '--pdb'])
5 changes: 3 additions & 2 deletions pandas/io/tests/test_s3.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@ def test_is_s3_url(self):
self.assertFalse(_is_s3_url("s4://pandas/somethingelse.com"))

if __name__ == '__main__':
nose.runmodule(argv=[__file__, '-vvs', '-x', '--pdb', '--pdb-failure'],
exit=False)
import pytest

pytest.main([__file__, '-vvs', '-x', '--pdb'])
5 changes: 3 additions & 2 deletions pandas/io/tests/test_sql.py
Original file line number Diff line number Diff line change
Expand Up @@ -2658,5 +2658,6 @@ def clean_up(test_table_to_drop):


if __name__ == '__main__':
nose.runmodule(argv=[__file__, '-vvs', '-x', '--pdb', '--pdb-failure'],
exit=False)
import pytest

pytest.main([__file__, '-vvs', '-x', '--pdb'])
5 changes: 3 additions & 2 deletions pandas/io/tests/test_stata.py
Original file line number Diff line number Diff line change
Expand Up @@ -1236,5 +1236,6 @@ def test_stata_111(self):


if __name__ == '__main__':
nose.runmodule(argv=[__file__, '-vvs', '-x', '--pdb', '--pdb-failure'],
exit=False)
import pytest

pytest.main([__file__, '-vvs', '-x', '--pdb'])
6 changes: 3 additions & 3 deletions pandas/rpy/tests/test_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,6 @@ def test_factor(self):
assert np.equal(result, factors)

if __name__ == '__main__':
nose.runmodule(argv=[__file__, '-vvs', '-x', '--pdb', '--pdb-failure'],
# '--with-coverage', '--cover-package=pandas.core'],
exit=False)
import pytest

pytest.main([__file__, '-vvs', '-x', '--pdb'])
6 changes: 3 additions & 3 deletions pandas/sparse/tests/test_array.py
Original file line number Diff line number Diff line change
Expand Up @@ -797,6 +797,6 @@ def test_ufunc_args(self):


if __name__ == '__main__':
import nose
nose.runmodule(argv=[__file__, '-vvs', '-x', '--pdb', '--pdb-failure'],
exit=False)
import pytest

pytest.main([__file__, '-vvs', '-x', '--pdb'])
5 changes: 3 additions & 2 deletions pandas/sparse/tests/test_combine_concat.py
Original file line number Diff line number Diff line change
Expand Up @@ -360,5 +360,6 @@ def test_concat_sparse_dense(self):

if __name__ == '__main__':
import nose # noqa
nose.runmodule(argv=[__file__, '-vvs', '-x', '--pdb', '--pdb-failure'],
exit=False)
import pytest

pytest.main([__file__, '-vvs', '-x', '--pdb'])
6 changes: 3 additions & 3 deletions pandas/sparse/tests/test_frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -1066,6 +1066,6 @@ def test_numpy_func_call(self):
getattr(np, func)(self.frame)

if __name__ == '__main__':
import nose
nose.runmodule(argv=[__file__, '-vvs', '-x', '--pdb', '--pdb-failure'],
exit=False)
import pytest

pytest.main([__file__, '-vvs', '-x', '--pdb'])
5 changes: 3 additions & 2 deletions pandas/sparse/tests/test_libsparse.py
Original file line number Diff line number Diff line change
Expand Up @@ -589,5 +589,6 @@ def f(self):

if __name__ == '__main__':
import nose # noqa
nose.runmodule(argv=[__file__, '-vvs', '-x', '--pdb', '--pdb-failure'],
exit=False)
import pytest

pytest.main([__file__, '-vvs', '-x', '--pdb'])
6 changes: 3 additions & 3 deletions pandas/sparse/tests/test_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,6 @@ def test_getitem(self):


if __name__ == '__main__':
import nose
nose.runmodule(argv=[__file__, '-vvs', '-x', '--pdb', '--pdb-failure'],
exit=False)
import pytest

pytest.main([__file__, '-vvs', '-x', '--pdb'])
6 changes: 3 additions & 3 deletions pandas/sparse/tests/test_series.py
Original file line number Diff line number Diff line change
Expand Up @@ -1365,6 +1365,6 @@ def test_numpy_func_call(self):


if __name__ == '__main__':
import nose
nose.runmodule(argv=[__file__, '-vvs', '-x', '--pdb', '--pdb-failure'],
exit=False)
import pytest

pytest.main([__file__, '-vvs', '-x', '--pdb'])
6 changes: 3 additions & 3 deletions pandas/stats/tests/test_fama_macbeth.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,6 @@ def _check_stuff_works(self, result):
result.summary

if __name__ == '__main__':
import nose
nose.runmodule(argv=[__file__, '-vvs', '-x', '--pdb', '--pdb-failure'],
exit=False)
import pytest

pytest.main([__file__, '-vvs', '-x', '--pdb'])
5 changes: 3 additions & 2 deletions pandas/stats/tests/test_math.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,5 +59,6 @@ def test_inv_illformed(self):
self.assertTrue(np.allclose(rs, expected))

if __name__ == '__main__':
nose.runmodule(argv=[__file__, '-vvs', '-x', '--pdb', '--pdb-failure'],
exit=False)
import pytest

pytest.main([__file__, '-vvs', '-x', '--pdb'])
6 changes: 3 additions & 3 deletions pandas/stats/tests/test_ols.py
Original file line number Diff line number Diff line change
Expand Up @@ -977,6 +977,6 @@ def tsAssertEqual(self, ts1, ts2, **kwargs):


if __name__ == '__main__':
import nose
nose.runmodule(argv=[__file__, '-vvs', '-x', '--pdb', '--pdb-failure'],
exit=False)
import pytest

pytest.main([__file__, '-vvs', '-x', '--pdb'])
5 changes: 3 additions & 2 deletions pandas/tests/formats/test_format.py
Original file line number Diff line number Diff line change
Expand Up @@ -4435,5 +4435,6 @@ def test_format_percentiles():


if __name__ == '__main__':
nose.runmodule(argv=[__file__, '-vvs', '-x', '--pdb', '--pdb-failure'],
exit=False)
import pytest

pytest.main([__file__, '-vvs', '-x', '--pdb'])
5 changes: 3 additions & 2 deletions pandas/tests/formats/test_printing.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,5 +138,6 @@ def test_ambiguous_width(self):


if __name__ == '__main__':
nose.runmodule(argv=[__file__, '-vvs', '-x', '--pdb', '--pdb-failure'],
exit=False)
import pytest

pytest.main([__file__, '-vvs', '-x', '--pdb'])
5 changes: 3 additions & 2 deletions pandas/tests/frame/test_analytics.py
Original file line number Diff line number Diff line change
Expand Up @@ -2158,5 +2158,6 @@ def test_dot(self):
df.dot(df2)

if __name__ == '__main__':
nose.runmodule(argv=[__file__, '-vvs', '-x', '--pdb', '--pdb-failure'],
exit=False)
import pytest

pytest.main([__file__, '-vvs', '-x', '--pdb'])
5 changes: 3 additions & 2 deletions pandas/tests/frame/test_asof.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,5 +68,6 @@ def test_subset(self):
assert_frame_equal(result, expected)

if __name__ == '__main__':
nose.runmodule(argv=[__file__, '-vvs', '-x', '--pdb', '--pdb-failure'],
exit=False)
import pytest

pytest.main([__file__, '-vvs', '-x', '--pdb'])
5 changes: 3 additions & 2 deletions pandas/tests/frame/test_constructors.py
Original file line number Diff line number Diff line change
Expand Up @@ -1914,5 +1914,6 @@ def test_from_index(self):
if __name__ == '__main__':
import nose # noqa

nose.runmodule(argv=[__file__, '-vvs', '-x', '--pdb', '--pdb-failure'],
exit=False)
import pytest

pytest.main([__file__, '-vvs', '-x', '--pdb'])
5 changes: 3 additions & 2 deletions pandas/tests/frame/test_misc_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -484,5 +484,6 @@ def _check_f(base, f):


if __name__ == '__main__':
nose.runmodule(argv=[__file__, '-vvs', '-x', '--pdb', '--pdb-failure'],
exit=False)
import pytest

pytest.main([__file__, '-vvs', '-x', '--pdb'])
7 changes: 3 additions & 4 deletions pandas/tests/frame/test_missing.py
Original file line number Diff line number Diff line change
Expand Up @@ -660,7 +660,6 @@ def test_interp_ignore_all_good(self):


if __name__ == '__main__':
import nose
nose.runmodule(argv=[__file__, '-vvs', '-x', '--pdb', '--pdb-failure'],
# '--with-coverage', '--cover-package=pandas.core']
exit=False)
import pytest

pytest.main([__file__, '-vvs', '-x', '--pdb'])
5 changes: 3 additions & 2 deletions pandas/tests/frame/test_operators.py
Original file line number Diff line number Diff line change
Expand Up @@ -1261,5 +1261,6 @@ def test_alignment_non_pandas(self):


if __name__ == '__main__':
nose.runmodule(argv=[__file__, '-vvs', '-x', '--pdb', '--pdb-failure'],
exit=False)
import pytest

pytest.main([__file__, '-vvs', '-x', '--pdb'])
5 changes: 3 additions & 2 deletions pandas/tests/frame/test_query_eval.py
Original file line number Diff line number Diff line change
Expand Up @@ -1158,5 +1158,6 @@ def setUpClass(cls):


if __name__ == '__main__':
nose.runmodule(argv=[__file__, '-vvs', '-x', '--pdb', '--pdb-failure'],
exit=False)
import pytest

pytest.main([__file__, '-vvs', '-x', '--pdb'])
5 changes: 3 additions & 2 deletions pandas/tests/indexing/test_callable.py
Original file line number Diff line number Diff line change
Expand Up @@ -271,5 +271,6 @@ def test_frame_iloc_callable_setitem(self):


if __name__ == '__main__':
nose.runmodule(argv=[__file__, '-vvs', '-x', '--pdb', '--pdb-failure'],
exit=False)
import pytest

pytest.main([__file__, '-vvs', '-x', '--pdb'])
5 changes: 3 additions & 2 deletions pandas/tests/indexing/test_indexing.py
Original file line number Diff line number Diff line change
Expand Up @@ -5407,5 +5407,6 @@ def test_none_coercion_mixed_dtypes(self):


if __name__ == '__main__':
nose.runmodule(argv=[__file__, '-vvs', '-x', '--pdb', '--pdb-failure'],
exit=False)
import pytest

pytest.main([__file__, '-vvs', '-x', '--pdb'])
5 changes: 3 additions & 2 deletions pandas/tests/plotting/test_boxplot_method.py
Original file line number Diff line number Diff line change
Expand Up @@ -372,5 +372,6 @@ def test_grouped_box_multiple_axes(self):


if __name__ == '__main__':
nose.runmodule(argv=[__file__, '-vvs', '-x', '--pdb', '--pdb-failure'],
exit=False)
import pytest

pytest.main([__file__, '-vvs', '-x', '--pdb'])
Loading

0 comments on commit cd9bf8f

Please sign in to comment.