File tree 2 files changed +6
-6
lines changed
2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ def setup(self):
15
15
self .cur_index = self .df .index
16
16
17
17
def time_get_index (self ):
18
- self .df .index = self . df . index
18
+ self .df .index
19
19
20
20
def time_set_index (self ):
21
21
self .df .index = self .cur_index
Original file line number Diff line number Diff line change @@ -44,15 +44,15 @@ def constructor(request):
44
44
class TestPandasDelegate :
45
45
class Delegator :
46
46
_properties = ["prop" ]
47
- _methods = ["bar " ]
47
+ _methods = ["test_method " ]
48
48
49
49
def _set_prop (self , value ):
50
50
self .prop = value
51
51
52
52
def _get_prop (self ):
53
53
return self .prop
54
54
55
- value = property (_get_prop , _set_prop , doc = "foo property" )
55
+ prop = property (_get_prop , _set_prop , doc = "foo property" )
56
56
57
57
def test_method (self , * args , ** kwargs ):
58
58
"""a test bar method"""
@@ -78,15 +78,15 @@ def test_invalid_delegation(self):
78
78
79
79
delegate = self .Delegate (self .Delegator ())
80
80
81
- msg = "You cannot access the property foo "
81
+ msg = "You cannot access the property prop "
82
82
with pytest .raises (TypeError , match = msg ):
83
83
delegate .prop
84
84
85
- msg = "The property foo cannot be set"
85
+ msg = "The property prop cannot be set"
86
86
with pytest .raises (TypeError , match = msg ):
87
87
delegate .prop = 5
88
88
89
- msg = "You cannot access the property foo "
89
+ msg = "You cannot access the property prop "
90
90
with pytest .raises (TypeError , match = msg ):
91
91
delegate .prop ()
92
92
You can’t perform that action at this time.
0 commit comments