Skip to content

Commit 93602ac

Browse files
victorjorisvandenbossche
victor
authored andcommitted
Using null context manager from pandas.util.testing.
1 parent 4669324 commit 93602ac

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

pandas/tests/scalar/timedelta/test_construction.py

+1-7
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,6 @@
88
import pandas.util.testing as tm
99
from pandas import Timedelta
1010

11-
import sys
12-
if sys.version_info >= (3, 3):
13-
from contextlib import ExitStack as do_not_raise
14-
else:
15-
from contextlib2 import ExitStack as do_not_raise
16-
1711

1812
def test_construction():
1913
expected = np.timedelta64(10, 'D').astype('m8[ns]').view('i8')
@@ -219,7 +213,7 @@ def test_td_constructor_value_error():
219213

220214

221215
@pytest.mark.parametrize("redundant_unit, expectation", [
222-
("", do_not_raise()),
216+
("", tm.do_not_raise),
223217
("d", pytest.raises(ValueError)),
224218
("us", pytest.raises(ValueError))])
225219
@pytest.mark.parametrize("unit", [

0 commit comments

Comments
 (0)