File tree 1 file changed +7
-6
lines changed
1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -31,9 +31,10 @@ def path(ext):
31
31
with ensure_clean (ext ) as file_path :
32
32
yield file_path
33
33
34
+
34
35
@pytest .fixture
35
36
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.
37
38
38
39
Rather than requiring `engine=...` to be provided explicitly as an
39
40
argument in each test, this fixture sets a global option to dictate
@@ -46,11 +47,11 @@ def set_engine(engine, ext):
46
47
class and any subclasses, on account of the `autouse=True`
47
48
argument
48
49
"""
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
54
55
55
56
56
57
@td .skip_if_no ("xlrd" )
You can’t perform that action at this time.
0 commit comments