@@ -25,15 +25,16 @@ class TestPointwidth(object):
2525 (timedelta (days = 30 ), 51 ),
2626 (timedelta (days = 7 ), 49 ),
2727 (timedelta (days = 1 ), 46 ),
28- (timedelta (hours = 4 ), 45 ),
29- (timedelta (minutes = 15 ), 40 ),
30- (timedelta (seconds = 30 ), 29 ),
28+ (timedelta (hours = 4 ), 43 ),
29+ (timedelta (minutes = 15 ), 39 ),
30+ (timedelta (seconds = 30 ), 34 ),
3131 ])
32- def test_from_nanoseconds (self , delta , expected ):
32+
33+ def test_from_timedelta (self , delta , expected ):
3334 """
34- Test getting the closest point width from nanoseconds
35+ Test getting the closest point width from a timedelta
3536 """
36- assert pointwidth .from_nanoseconds ( nsec ) == expected
37+ assert pointwidth .from_timedelta ( delta ) == expected
3738
3839 @pytest .mark .parametrize ("nsec, expected" , [
3940 (ns_delta (days = 365 ), 54 ),
@@ -44,6 +45,7 @@ def test_from_nanoseconds(self, delta, expected):
4445 (ns_delta (minutes = 30 ), 40 ),
4546 (ns_delta (seconds = 1 ), 29 ),
4647 ])
48+
4749 def test_from_nanoseconds (self , nsec , expected ):
4850 """
4951 Test getting the closest point width from nanoseconds
0 commit comments