Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_new_scenario(beamng):
with beamng as bng:
scenario = Scenario('smallgrid', 'test_scenario')
vehicle = Vehicle('test_car', model='etk800')
scenario.add_vehicle(vehicle, pos=(0, 0, 0), rot=(0, 0, 0))
scenario.make(bng)
bng.load_scenario(scenario)
assert bng.get_scenario_name() == 'test_scenario'
scenario.delete(beamng)
with beamng as bng:
with pytest.raises(BNGValueError):
bng.load_scenario(scenario)