Skip to content

Releases: tuppl/pytest-webots

v0.2.0

Choose a tag to compare

@github-actions github-actions released this 23 Aug 16:15

Full Changelog: v0.1.1...v0.2.0

v0.1.1

Choose a tag to compare

@github-actions github-actions released this 20 Aug 16:29

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

Choose a tag to compare

@github-actions github-actions released this 19 Aug 22:08

New Features

  • @pytest.mark.webots_world boots a Webots world for a test, with scope,
    mode, args and timeout; stacked markers parameterise over several worlds.
  • @pytest.mark.webots_controller attaches an extern controller to a named
    robot; stacked markers run several robots in one test.
  • The webots fixture: the Supervisor API, stepping/resetting/reloading,
    simulation time, per-test controllers, and webots.launch_controller() to
    start one mid-test.
  • webots.world exposes 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 by webots_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_controller hook for other build systems.
  • Agent plugins (webots_agent_plugins) let you register custom ops that run
    inside Webots, callable via webots.ops.my_op(...).
  • Hooks for world resolution, args, lifecycle, reset, controllers, and builds.
  • pytest-xdist support: worker-offset ports and xdist_group markers so
    --dist loadgroup keeps 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. Use realtime or fast.
  • Agent handles are never released. agent.handles grows 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