Repository navigation
Releases: tuppl/pytest-webots
Releases · tuppl/pytest-webots
Release list
v0.2.0
Full Changelog: v0.1.1...v0.2.0
v0.1.1
Changes
- Build controllers eagerly and cache build failures. Failed builds will fail tests that declared the controller.
Fixes
- Contain controller setup failures.
Full Changelog: v0.1.0...v0.1.1
v0.1.0
New Features
@pytest.mark.webots_worldboots a Webots world for a test, withscope,
mode,argsandtimeout; stacked markers parameterise over several worlds.@pytest.mark.webots_controllerattaches an extern controller to a named
robot; stacked markers run several robots in one test.- The
webotsfixture: the Supervisor API, stepping/resetting/reloading,
simulation time, per-test controllers, andwebots.launch_controller()to
start one mid-test. webots.worldexposes the underlying Webots process: port, robots, pid,
kill(),output(),command().- Worlds are process-isolated, reused across the tests that share them, and
reset in between; crashes reboot the world, bounded bywebots_max_restarts. - Ports are allocated from a monotonic counter and never reissued; the plugin
follows the port Webots actually serves if it drifts from the one requested. - C/C++ controllers are built automatically from a makefile and cached on a
source hash;build=also accepts a command sequence or a
pytest_webots_build_controllerhook for other build systems. - Agent plugins (
webots_agent_plugins) let you register custom ops that run
inside Webots, callable viawebots.ops.my_op(...). - Hooks for world resolution, args, lifecycle, reset, controllers, and builds.
- pytest-xdist support: worker-offset ports and
xdist_groupmarkers so
--dist loadgroupkeeps tests sharing a world on one worker.
Known issues
mode="pause"is accepted but never boots. Webots does not advance the
simulation, so the supervisor agent never becomes ready and the boot fails on
timeout. Userealtimeorfast.- Agent handles are never released.
agent.handlesgrows for the lifetime of a
world, so a long session-scoped world that repeatedly takes nodes accumulates
entries. - An op returning a value JSON cannot represent, such as a
set, silently
yields a proxy to the test instead of raising.
Full Changelog: https://github.com/tuppl/pytest-webots/commits/v0.1.0