This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import pytest | |
| scenarios = [('first', {'attribute': 'value'}), ('second', {'attribute': 'value'})] | |
| @pytest.mark.parametrize("test_id,scenario",scenarios) | |
| @pytest.mark.parametrize("count",range(3)) #Remember the order , if you move it first then it will not run it the order i desired i-e first,second,first second | |
| def test_scenarios(test_id,scenario,count): | |
| assert scenario["attribute"] == "value" | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import pytest | |
| @pytest.fixture(scope="module") | |
| def run_remote_fixture_script(connection_info, command_name, *args): | |
| ssh = SSHClient() | |
| ssh.connect(...) | |
| command = ''' | |
| ./load_fixture_script {test_target} {command} {args}; | |
| '''.format( | |
| test_target=connection_info.target, | |
| command=command_name, |