We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 193beb3 commit 77e2455Copy full SHA for 77e2455
pandas/tseries/tests/test_period.py
@@ -1929,10 +1929,12 @@ def test_to_datetime_1703(self):
1929
def test_get_loc_msg(self):
1930
idx = period_range('2000-1-1', freq='A', periods=10)
1931
bad_period = Period('2012', 'A')
1932
+ self.assertRaises(KeyError, idx.get_loc, bad_period)
1933
+
1934
try:
1935
idx.get_loc(bad_period)
1936
except KeyError as inst:
- self.assert_(inst.message == bad_period)
1937
+ self.assert_(inst.args[0] == bad_period)
1938
1939
def test_append_concat(self):
1940
# #1815
0 commit comments