mirror of
https://github.com/JackHopkins/factorio-learning-environment.git
synced 2025-09-06 13:23:58 +00:00

Some checks failed
Lint and Format / lint (push) Has been cancelled
* sessions based * try out caching + no sleep * update fixture usage * better reset usge * state less on tech, probably breaking change * better fixtures + decouple resets * use pytest-xdist w 2 servers * using diff grouping for dep * formatting * formatting * caching for image * formatting * formatting * use uv * use uv caching * remove docker caching (its slower) * how about 4 workers? * no redundant resets * parameterize * change names * update all_technologies_researched usage change log: - used uv and cache dependencies - used 2 factorio headless server instances - added pytest-xdist & used 2 pytest workers - parametrized the slowest test -- `test_sleep.py` so as to balance it across workers - clarified resets in `instance.py` so separate instances arent needed for research testing - better fixture usage, with autouse reset - added configure_game callback for per test file setup of inventories & research state. - updated task abc all_technologies_researched usage, its now a param for reset - using 4 workers instead of 2, can probably double it again lol - pytest parameterized a slow test - fixed redundant reset in conftest final speedup: 9m 4s -> 1m, ≈9.07× faster
13 lines
233 B
Python
13 lines
233 B
Python
from fle.env.entities import Position
|
|
|
|
|
|
def test_path(game):
|
|
"""
|
|
Get a path from (0, 0) to (10, 0)
|
|
:param game:
|
|
:return:
|
|
"""
|
|
path = game._request_path(Position(x=0, y=0), Position(x=10, y=0))
|
|
|
|
assert path
|