Skip to content

Commit f2db75d

Browse files
committed
reverting change to reflect fixture moved out of class
1 parent 1a0cd33 commit f2db75d

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

pandas/tests/io/excel/test_writers.py

+7-6
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,10 @@ def path(ext):
3131
with ensure_clean(ext) as file_path:
3232
yield file_path
3333

34+
3435
@pytest.fixture
3536
def set_engine(engine, ext):
36-
"""Fixture to set engine for use in each test case.
37+
"""Fixture to set engine for use in each test case.
3738
3839
Rather than requiring `engine=...` to be provided explicitly as an
3940
argument in each test, this fixture sets a global option to dictate
@@ -46,11 +47,11 @@ def set_engine(engine, ext):
4647
class and any subclasses, on account of the `autouse=True`
4748
argument
4849
"""
49-
option_name = "io.excel.{ext}.writer".format(ext=ext.strip("."))
50-
prev_engine = get_option(option_name)
51-
set_option(option_name, engine)
52-
yield
53-
set_option(option_name, prev_engine) # Roll back option change
50+
option_name = "io.excel.{ext}.writer".format(ext=ext.strip("."))
51+
prev_engine = get_option(option_name)
52+
set_option(option_name, engine)
53+
yield
54+
set_option(option_name, prev_engine) # Roll back option change
5455

5556

5657
@td.skip_if_no("xlrd")

0 commit comments

Comments
 (0)