Skip to content

Commit c10e1d4

Browse files
TST: maintain list containing dtypes in TestPandasDtype
1 parent fecba12 commit c10e1d4

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

pandas/tests/dtypes/test_common.py

+3-5
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,9 @@ class TestPandasDtype(tm.TestCase):
1717
# Passing invalid dtype, both as a string or object, must raise TypeError
1818
def test_invalid_dtype_error(self):
1919
msg = 'not understood'
20-
with tm.assertRaisesRegexp(TypeError, msg):
21-
pandas_dtype(pd.Timestamp)
22-
23-
with tm.assertRaisesRegexp(TypeError, msg):
24-
pandas_dtype('time')
20+
for dtype in [pd.Timestamp, 'time']:
21+
with tm.assertRaisesRegexp(TypeError, msg):
22+
pandas_dtype(dtype)
2523

2624
def test_numpy_dtype(self):
2725
for dtype in ['M8[ns]', 'm8[ns]', 'object', 'float64', 'int64']:

0 commit comments

Comments
 (0)