Reorder parametrizations with modified argument lists
Marco Ricci

Marco Ricci commited on 2025-02-02 13:39:03
Zeige 2 geänderte Dateien mit 34 Einfügungen und 34 Löschungen.

... ...
@@ -73,6 +73,23 @@ class Parametrize(types.SimpleNamespace):
73 73
             ),
74 74
         ],
75 75
     )
76
+    VAULT_NATIVE_PARSER_CLASS_DATA = pytest.mark.parametrize(
77
+        ['config', 'parser_class', 'config_data'],
78
+        [
79
+            pytest.param(
80
+                tests.VAULT_V02_CONFIG,
81
+                vault_native.VaultNativeV02ConfigParser,
82
+                tests.VAULT_V02_CONFIG_DATA,
83
+                id='0.2',
84
+            ),
85
+            pytest.param(
86
+                tests.VAULT_V03_CONFIG,
87
+                vault_native.VaultNativeV03ConfigParser,
88
+                tests.VAULT_V03_CONFIG_DATA,
89
+                id='0.3',
90
+            ),
91
+        ],
92
+    )
76 93
     BAD_MASTER_KEYS_DATA = pytest.mark.parametrize(
77 94
         ['data', 'err_msg'],
78 95
         [
... ...
@@ -130,23 +147,6 @@ class Parametrize(types.SimpleNamespace):
130 147
             ),
131 148
         ],
132 149
     )
133
-    VAULT_NATIVE_PARSER_CLASS_DATA = pytest.mark.parametrize(
134
-        ['config', 'parser_class', 'config_data'],
135
-        [
136
-            pytest.param(
137
-                tests.VAULT_V02_CONFIG,
138
-                vault_native.VaultNativeV02ConfigParser,
139
-                tests.VAULT_V02_CONFIG_DATA,
140
-                id='0.2',
141
-            ),
142
-            pytest.param(
143
-                tests.VAULT_V03_CONFIG,
144
-                vault_native.VaultNativeV03ConfigParser,
145
-                tests.VAULT_V03_CONFIG_DATA,
146
-                id='0.3',
147
-            ),
148
-        ],
149
-    )
150 150
     PATH = pytest.mark.parametrize('path', ['.vault', None])
151 151
     BAD_STOREROOM_CONFIG_DATA = pytest.mark.parametrize(
152 152
         ['zipped_config', 'error_text'],
... ...
@@ -39,6 +39,23 @@ class Parametrize(types.SimpleNamespace):
39 39
             ),
40 40
         ],
41 41
     )
42
+    UINT32_EXCEPTIONS = pytest.mark.parametrize(
43
+        ['input', 'exc_type', 'exc_pattern'],
44
+        [
45
+            pytest.param(
46
+                10000000000000000,
47
+                OverflowError,
48
+                'int too big to convert',
49
+                id='10000000000000000',
50
+            ),
51
+            pytest.param(
52
+                -1,
53
+                OverflowError,
54
+                "can't convert negative int to unsigned",
55
+                id='-1',
56
+            ),
57
+        ],
58
+    )
42 59
     SSH_UNSTRING_EXCEPTIONS = pytest.mark.parametrize(
43 60
         ['input', 'exc_type', 'exc_pattern', 'has_trailer', 'parts'],
44 61
         [
... ...
@@ -298,23 +315,6 @@ class Parametrize(types.SimpleNamespace):
298 315
         list(tests.UNSUITABLE_KEYS.items()),
299 316
         ids=tests.UNSUITABLE_KEYS.keys(),
300 317
     )
301
-    UINT32_EXCEPTIONS = pytest.mark.parametrize(
302
-        ['input', 'exc_type', 'exc_pattern'],
303
-        [
304
-            pytest.param(
305
-                10000000000000000,
306
-                OverflowError,
307
-                'int too big to convert',
308
-                id='10000000000000000',
309
-            ),
310
-            pytest.param(
311
-                -1,
312
-                OverflowError,
313
-                "can't convert negative int to unsigned",
314
-                id='-1',
315
-            ),
316
-        ],
317
-    )
318 318
 
319 319
 
320 320
 class TestStaticFunctionality:
321 321