Skip to content

Commit 331c3cb

Browse files
committed
more clean-up
1 parent 7a1ee91 commit 331c3cb

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

asv_bench/benchmarks/attrs_caching.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ def setup(self):
1515
self.cur_index = self.df.index
1616

1717
def time_get_index(self):
18-
self.df.index = self.df.index
18+
self.df.index
1919

2020
def time_set_index(self):
2121
self.df.index = self.cur_index

pandas/tests/base/test_constructors.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,15 @@ def constructor(request):
4444
class TestPandasDelegate:
4545
class Delegator:
4646
_properties = ["prop"]
47-
_methods = ["bar"]
47+
_methods = ["test_method"]
4848

4949
def _set_prop(self, value):
5050
self.prop = value
5151

5252
def _get_prop(self):
5353
return self.prop
5454

55-
value = property(_get_prop, _set_prop, doc="foo property")
55+
prop = property(_get_prop, _set_prop, doc="foo property")
5656

5757
def test_method(self, *args, **kwargs):
5858
"""a test bar method"""
@@ -78,15 +78,15 @@ def test_invalid_delegation(self):
7878

7979
delegate = self.Delegate(self.Delegator())
8080

81-
msg = "You cannot access the property foo"
81+
msg = "You cannot access the property prop"
8282
with pytest.raises(TypeError, match=msg):
8383
delegate.prop
8484

85-
msg = "The property foo cannot be set"
85+
msg = "The property prop cannot be set"
8686
with pytest.raises(TypeError, match=msg):
8787
delegate.prop = 5
8888

89-
msg = "You cannot access the property foo"
89+
msg = "You cannot access the property prop"
9090
with pytest.raises(TypeError, match=msg):
9191
delegate.prop()
9292

0 commit comments

Comments
 (0)