def test_state_machine_absolute(temp_file): state_table = POCS.load_state_table() assert isinstance(state_table, dict) with open(temp_file, 'w') as f: f.write(yaml.dump(state_table)) file_path = os.path.abspath(temp_file) assert POCS.load_state_table(state_table_name=file_path)
def test_bad_state_machine_file(): with pytest.raises(error.InvalidConfig): POCS.load_state_table(state_table_name='foo')