Marco Ricci commited on 2024-09-21 11:58:57
              Zeige 1 geänderte Dateien mit 8 Einfügungen und 6 Löschungen.
            
Remove unused test parameters, which were used solely for display purposes to generate a readable test ID. Instead of this, use the `ids` parameter of `pytest.mark.parametrize` directly.
| ... | ... | 
                      @@ -168,12 +168,13 @@ class TestStaticFunctionality:  | 
                  
| 168 | 168 | 
                        @tests.skip_if_no_agent  | 
                    
| 169 | 169 | 
                        class TestAgentInteraction:  | 
                    
| 170 | 170 | 
                        @pytest.mark.parametrize(  | 
                    
| 171 | 
                        - ['keytype', 'data_dict'], list(tests.SUPPORTED_KEYS.items())  | 
                    |
| 171 | 
                        + 'data_dict',  | 
                    |
| 172 | 
                        + list(tests.SUPPORTED_KEYS.values()),  | 
                    |
| 173 | 
                        + ids=tests.SUPPORTED_KEYS.keys(),  | 
                    |
| 172 | 174 | 
                        )  | 
                    
| 173 | 175 | 
                        def test_200_sign_data_via_agent(  | 
                    
| 174 | 
                        - self, keytype: str, data_dict: tests.SSHTestKey  | 
                    |
| 176 | 
                        + self, data_dict: tests.SSHTestKey  | 
                    |
| 175 | 177 | 
                        ) -> None:  | 
                    
| 176 | 
                        - del keytype # Unused.  | 
                    |
| 177 | 178 | 
                        private_key = data_dict['private_key']  | 
                    
| 178 | 179 | 
                        try:  | 
                    
| 179 | 180 | 
                        _ = subprocess.run(  | 
                    
| ... | ... | 
                      @@ -215,12 +216,13 @@ class TestAgentInteraction:  | 
                  
| 215 | 216 | 
                        ), 'SSH signature mismatch'  | 
                    
| 216 | 217 | 
                         | 
                    
| 217 | 218 | 
                        @pytest.mark.parametrize(  | 
                    
| 218 | 
                        - ['keytype', 'data_dict'], list(tests.UNSUITABLE_KEYS.items())  | 
                    |
| 219 | 
                        + 'data_dict',  | 
                    |
| 220 | 
                        + list(tests.UNSUITABLE_KEYS.values()),  | 
                    |
| 221 | 
                        + ids=tests.UNSUITABLE_KEYS.keys(),  | 
                    |
| 219 | 222 | 
                        )  | 
                    
| 220 | 223 | 
                        def test_201_sign_data_via_agent_unsupported(  | 
                    
| 221 | 
                        - self, keytype: str, data_dict: tests.SSHTestKey  | 
                    |
| 224 | 
                        + self, data_dict: tests.SSHTestKey  | 
                    |
| 222 | 225 | 
                        ) -> None:  | 
                    
| 223 | 
                        - del keytype # Unused.  | 
                    |
| 224 | 226 | 
                        private_key = data_dict['private_key']  | 
                    
| 225 | 227 | 
                        try:  | 
                    
| 226 | 228 | 
                        _ = subprocess.run(  | 
                    
| 227 | 229 |