Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c3c32c8

Browse files
committed
STY: Rename fixture->klass
1 parent db52d85 commit c3c32c8

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

lib/matplotlib/tests/test_animation.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ def test_null_movie_writer(anim):
5858
assert writer._count == anim.save_count
5959

6060

61-
@pytest.mark.parametrize('anim', [dict(fixture=dict)], indirect=['anim'])
61+
@pytest.mark.parametrize('anim', [dict(klass=dict)], indirect=['anim'])
6262
def test_animation_delete(anim):
6363
anim = animation.FuncAnimation(**anim)
6464
with pytest.warns(Warning, match='Animation was deleted'):
@@ -136,19 +136,19 @@ def animate(i):
136136
line.set_data(x, y)
137137
return line,
138138

139-
# "fixture" can be passed to determine the class returned by the fixture
139+
# "klass" can be passed to determine the class returned by the fixture
140140
kwargs = dict(getattr(request, 'param', {})) # make a copy
141-
fixture = kwargs.pop('fixture', animation.FuncAnimation)
141+
klass = kwargs.pop('klass', animation.FuncAnimation)
142142
if 'frames' not in kwargs:
143143
kwargs['frames'] = 5
144-
return fixture(fig=fig, func=animate, init_func=init, **kwargs)
144+
return klass(fig=fig, func=animate, init_func=init, **kwargs)
145145

146146

147147
# Smoke test for saving animations. In the future, we should probably
148148
# design more sophisticated tests which compare resulting frames a-la
149149
# matplotlib.testing.image_comparison
150150
@pytest.mark.parametrize('writer, output', WRITER_OUTPUT)
151-
@pytest.mark.parametrize('anim', [dict(fixture=dict)], indirect=['anim'])
151+
@pytest.mark.parametrize('anim', [dict(klass=dict)], indirect=['anim'])
152152
def test_save_animation_smoketest(tmpdir, writer, output, anim):
153153
if not animation.writers.is_available(writer):
154154
pytest.skip("writer '%s' not available on this system" % writer)
@@ -186,7 +186,7 @@ def test_save_animation_smoketest(tmpdir, writer, output, anim):
186186
('html5', '<video width'),
187187
('jshtml', '<script ')
188188
])
189-
@pytest.mark.parametrize('anim', [dict(fixture=dict)], indirect=['anim'])
189+
@pytest.mark.parametrize('anim', [dict(klass=dict)], indirect=['anim'])
190190
def test_animation_repr_html(writer, html, want, anim):
191191
# create here rather than in the fixture otherwise we get __del__ warnings
192192
# about producing no output

0 commit comments

Comments
 (0)