|
6 | 6 | from pytask import Mark |
7 | 7 | from pytask_r.collect import _parse_r_mark |
8 | 8 | from pytask_r.collect import r |
9 | | -from pytask_r.serialization import SERIALIZER |
| 9 | +from pytask_r.serialization import SERIALIZERS |
10 | 10 |
|
11 | 11 |
|
12 | 12 | @pytest.mark.unit |
13 | 13 | @pytest.mark.parametrize( |
14 | 14 | "args, kwargs, expectation, expected", |
15 | 15 | [ |
16 | | - ((), {}, pytest.raises(RuntimeError, match="The old syntax"), None), |
17 | | - ( |
18 | | - ("-o"), |
19 | | - {"script": "script.r"}, |
20 | | - pytest.raises(RuntimeError, match="The old syntax"), |
21 | | - None, |
22 | | - ), |
23 | | - ( |
24 | | - (), |
25 | | - {"options": ("-o")}, |
26 | | - pytest.raises(RuntimeError, match="The old syntax"), |
27 | | - None, |
28 | | - ), |
29 | 16 | ( |
30 | 17 | (), |
31 | 18 | { |
@@ -60,31 +47,6 @@ def test_r(args, kwargs, expectation, expected): |
60 | 47 | @pytest.mark.parametrize( |
61 | 48 | "mark, default_options, default_serializer, default_suffix, expectation, expected", |
62 | 49 | [ |
63 | | - ( |
64 | | - Mark("r", (), {}), |
65 | | - [], |
66 | | - None, |
67 | | - ".json", |
68 | | - pytest.raises(RuntimeError, match="The old syntax for @pytask.mark.r"), |
69 | | - Mark( |
70 | | - "r", |
71 | | - (), |
72 | | - { |
73 | | - "script": None, |
74 | | - "options": [], |
75 | | - "serializer": None, |
76 | | - "suffix": ".json", |
77 | | - }, |
78 | | - ), |
79 | | - ), |
80 | | - ( |
81 | | - Mark("r", ("-o"), {}), |
82 | | - [], |
83 | | - None, |
84 | | - ".json", |
85 | | - pytest.raises(RuntimeError, match="The old syntax for @pytask.mark.r"), |
86 | | - None, |
87 | | - ), |
88 | 50 | ( |
89 | 51 | Mark("r", (), {"script": "script.r"}), |
90 | 52 | [], |
@@ -122,7 +84,7 @@ def test_r(args, kwargs, expectation, expected): |
122 | 84 | "script": "script.r", |
123 | 85 | "options": [], |
124 | 86 | "serializer": "json", |
125 | | - "suffix": SERIALIZER["json"]["suffix"], |
| 87 | + "suffix": SERIALIZERS["json"]["suffix"], |
126 | 88 | }, |
127 | 89 | ), |
128 | 90 | ), |
|
0 commit comments