@@ -322,9 +322,9 @@ def test_constructor_simple_new(self):
322
322
idx = period_range ("2007-01" , name = "p" , periods = 2 , freq = "M" )
323
323
324
324
with pytest .raises (AssertionError , match = "<class .*PeriodIndex'>" ):
325
- idx ._simple_new (idx , name = "p" , freq = idx . freq )
325
+ idx ._simple_new (idx , name = "p" )
326
326
327
- result = idx ._simple_new (idx ._data , name = "p" , freq = idx . freq )
327
+ result = idx ._simple_new (idx ._data , name = "p" )
328
328
tm .assert_index_equal (result , idx )
329
329
330
330
with pytest .raises (AssertionError ):
@@ -339,19 +339,19 @@ def test_constructor_simple_new_empty(self):
339
339
# GH13079
340
340
idx = PeriodIndex ([], freq = "M" , name = "p" )
341
341
with pytest .raises (AssertionError , match = "<class .*PeriodIndex'>" ):
342
- idx ._simple_new (idx , name = "p" , freq = "M" )
342
+ idx ._simple_new (idx , name = "p" )
343
343
344
- result = idx ._simple_new (idx ._data , name = "p" , freq = "M" )
344
+ result = idx ._simple_new (idx ._data , name = "p" )
345
345
tm .assert_index_equal (result , idx )
346
346
347
347
@pytest .mark .parametrize ("floats" , [[1.1 , 2.1 ], np .array ([1.1 , 2.1 ])])
348
348
def test_constructor_floats (self , floats ):
349
349
with pytest .raises (AssertionError , match = "<class " ):
350
- PeriodIndex ._simple_new (floats , freq = "M" )
350
+ PeriodIndex ._simple_new (floats )
351
351
352
352
msg = "PeriodIndex does not allow floating point in construction"
353
353
with pytest .raises (TypeError , match = msg ):
354
- PeriodIndex (floats , freq = "M" )
354
+ PeriodIndex (floats )
355
355
356
356
def test_constructor_nat (self ):
357
357
msg = "start and end must not be NaT"
0 commit comments