File tree Expand file tree Collapse file tree 1 file changed +7
-8
lines changed Expand file tree Collapse file tree 1 file changed +7
-8
lines changed Original file line number Diff line number Diff line change 10
10
from conftest import write_test_file
11
11
12
12
13
- def foo_bar_converter ():
13
+ @pytest .fixture
14
+ def FooBarConverter ():
14
15
work_dir = Path (tempfile .mkdtemp ())
15
16
16
17
@converter
17
18
@python .define (outputs = {"out_file" : Bar }) # type: ignore[misc]
18
- def foo_bar_converter_ (in_file : Foo ):
19
+ def FooBarConverter_ (in_file : Foo ):
19
20
return Bar (write_test_file (work_dir / "bar.bar" , in_file .raw_contents ))
20
21
21
- return foo_bar_converter_
22
+ return FooBarConverter_
22
23
23
24
24
25
def baz_bar_converter ():
@@ -53,13 +54,11 @@ class Outputs(shell.Outputs):
53
54
return FooQuxConverter_
54
55
55
56
56
- def test_get_converter_functask (foo_bar_converter , work_dir ):
57
+ def test_get_converter_functask (FooBarConverter , work_dir ):
57
58
58
59
fspath = work_dir / "test.foo"
59
60
write_test_file (fspath )
60
- assert attrs .asdict (Bar .get_converter (Foo ).task ) == attrs .asdict (
61
- foo_bar_converter ()
62
- )
61
+ assert attrs .asdict (Bar .get_converter (Foo ).task ) == attrs .asdict (FooBarConverter ())
63
62
64
63
65
64
def test_get_converter_shellcmd (FooQuxConverter , work_dir ):
@@ -77,7 +76,7 @@ def test_get_converter_fail(work_dir):
77
76
Baz .get_converter (Foo )
78
77
79
78
80
- def test_convert_functask (foo_bar_converter , work_dir ):
79
+ def test_convert_functask (FooBarConverter , work_dir ):
81
80
82
81
fspath = work_dir / "test.foo"
83
82
write_test_file (fspath )
You can’t perform that action at this time.
0 commit comments