@@ -419,8 +419,6 @@ def test_get_finder(self):
419
419
assert conv .get_finder ("A" ) == conv ._annual_finder
420
420
assert conv .get_finder ("W" ) == conv ._daily_finder
421
421
422
- # TODO: The finder should be retested due to wrong xlim values on x-axis
423
- @pytest .mark .xfail (reason = "TODO: check details in GH28021" )
424
422
@pytest .mark .slow
425
423
def test_finder_daily (self ):
426
424
day_lst = [10 , 40 , 252 , 400 , 950 , 2750 , 10000 ]
@@ -444,8 +442,6 @@ def test_finder_daily(self):
444
442
assert rs1 == xpl1
445
443
assert rs2 == xpl2
446
444
447
- # TODO: The finder should be retested due to wrong xlim values on x-axis
448
- @pytest .mark .xfail (reason = "TODO: check details in GH28021" )
449
445
@pytest .mark .slow
450
446
def test_finder_quarterly (self ):
451
447
yrs = [3.5 , 11 ]
@@ -469,8 +465,6 @@ def test_finder_quarterly(self):
469
465
assert rs1 == xpl1
470
466
assert rs2 == xpl2
471
467
472
- # TODO: The finder should be retested due to wrong xlim values on x-axis
473
- @pytest .mark .xfail (reason = "TODO: check details in GH28021" )
474
468
@pytest .mark .slow
475
469
def test_finder_monthly (self ):
476
470
yrs = [1.15 , 2.5 , 4 , 11 ]
@@ -504,8 +498,6 @@ def test_finder_monthly_long(self):
504
498
xp = Period ("1989Q1" , "M" ).ordinal
505
499
assert rs == xp
506
500
507
- # TODO: The finder should be retested due to wrong xlim values on x-axis
508
- @pytest .mark .xfail (reason = "TODO: check details in GH28021" )
509
501
@pytest .mark .slow
510
502
def test_finder_annual (self ):
511
503
xp = [1987 , 1988 , 1990 , 1990 , 1995 , 2020 , 2070 , 2170 ]
@@ -530,7 +522,7 @@ def test_finder_minutely(self):
530
522
_ , ax = self .plt .subplots ()
531
523
ser .plot (ax = ax )
532
524
xaxis = ax .get_xaxis ()
533
- rs = xaxis .get_majorticklocs ()[1 ]
525
+ rs = xaxis .get_majorticklocs ()[0 ]
534
526
xp = Period ("1/1/1999" , freq = "Min" ).ordinal
535
527
536
528
assert rs == xp
@@ -542,7 +534,7 @@ def test_finder_hourly(self):
542
534
_ , ax = self .plt .subplots ()
543
535
ser .plot (ax = ax )
544
536
xaxis = ax .get_xaxis ()
545
- rs = xaxis .get_majorticklocs ()[1 ]
537
+ rs = xaxis .get_majorticklocs ()[0 ]
546
538
xp = Period ("1/1/1999" , freq = "H" ).ordinal
547
539
548
540
assert rs == xp
@@ -1418,9 +1410,7 @@ def test_plot_outofbounds_datetime(self):
1418
1410
1419
1411
def test_format_timedelta_ticks_narrow (self ):
1420
1412
1421
- expected_labels = [
1422
- "00:00:00.0000000{:0>2d}" .format (i ) for i in np .arange (0 , 10 , 2 )
1423
- ]
1413
+ expected_labels = ["00:00:00.0000000{:0>2d}" .format (i ) for i in np .arange (10 )]
1424
1414
1425
1415
rng = timedelta_range ("0" , periods = 10 , freq = "ns" )
1426
1416
df = DataFrame (np .random .randn (len (rng ), 3 ), rng )
@@ -1430,8 +1420,8 @@ def test_format_timedelta_ticks_narrow(self):
1430
1420
labels = ax .get_xticklabels ()
1431
1421
1432
1422
result_labels = [x .get_text () for x in labels ]
1433
- assert ( len (result_labels ) - 2 ) == len (expected_labels )
1434
- assert result_labels [ 1 : - 1 ] == expected_labels
1423
+ assert len (result_labels ) == len (expected_labels )
1424
+ assert result_labels == expected_labels
1435
1425
1436
1426
def test_format_timedelta_ticks_wide (self ):
1437
1427
expected_labels = [
@@ -1454,8 +1444,8 @@ def test_format_timedelta_ticks_wide(self):
1454
1444
labels = ax .get_xticklabels ()
1455
1445
1456
1446
result_labels = [x .get_text () for x in labels ]
1457
- assert ( len (result_labels ) - 2 ) == len (expected_labels )
1458
- assert result_labels [ 1 : - 1 ] == expected_labels
1447
+ assert len (result_labels ) == len (expected_labels )
1448
+ assert result_labels == expected_labels
1459
1449
1460
1450
def test_timedelta_plot (self ):
1461
1451
# test issue #8711
0 commit comments