mirror of
https://github.com/JackHopkins/factorio-learning-environment.git
synced 2025-09-06 21:48:51 +00:00
tests
This commit is contained in:
@@ -7,7 +7,13 @@ setup_platform() {
|
||||
if [ "$FORCE_AMD" = true ]; then
|
||||
export DOCKER_PLATFORM="linux/amd64"
|
||||
elif [ "$ARCH" = "arm64" ] || [ "$ARCH" = "aarch64" ]; then
|
||||
export DOCKER_PLATFORM="linux/arm64"
|
||||
# On macOS ARM64, automatically use AMD64 emulation since Factorio image lacks ARM64 support
|
||||
if [ "$OS" = "Darwin" ]; then
|
||||
export DOCKER_PLATFORM="linux/amd64"
|
||||
echo "Note: Using AMD64 emulation on macOS ARM64 (Factorio image lacks native ARM64 support)"
|
||||
else
|
||||
export DOCKER_PLATFORM="linux/arm64"
|
||||
fi
|
||||
else
|
||||
export DOCKER_PLATFORM="linux/amd64"
|
||||
fi
|
||||
|
@@ -103,6 +103,7 @@ def test_move_to_elapsed_ticks_and_timing(game):
|
||||
|
||||
# Get initial position and ticks
|
||||
initial_pos = Position(x=0, y=0)
|
||||
game.move_to(initial_pos)
|
||||
initial_ticks = game.instance.get_elapsed_ticks()
|
||||
|
||||
# Move to a position 5 tiles away
|
||||
|
@@ -2,7 +2,7 @@ import time
|
||||
import pytest
|
||||
|
||||
|
||||
@pytest.mark.parametrize("speed", range(10)) # 10 independent items
|
||||
@pytest.mark.parametrize("speed", range(1, 10)) # 10 independent items
|
||||
def test_sleep(game, speed):
|
||||
game.instance.set_speed(speed)
|
||||
start = time.time()
|
||||
|
Reference in New Issue
Block a user