updated api usage

This commit is contained in:
hrshtt
2025-08-20 01:15:46 +05:30
parent 71a2971409
commit a5f6858e1b
2 changed files with 3 additions and 3 deletions

View File

@@ -277,14 +277,14 @@ def test_harvest_provides_score(game):
stone_position = game.nearest(Resource.Stone)
game.move_to(stone_position)
stats = game._production_stats() # noqa
stats = game._get_production_stats() # noqa
reward, _ = game.score()
# Mine 5 stone (enough for one furnace)
stone_needed = 5
stone_mined = game.harvest_resource(stone_position, stone_needed)
print(f"Mined {stone_mined} stone")
nstats = game._production_stats() # noqa
nstats = game._get_production_stats() # noqa
nreward, _ = game.score()
assert nreward > reward

View File

@@ -45,7 +45,7 @@ class TestProductionStats(unittest.TestCase):
def test_lua2python(self):
result = _lua2python(
"pcall(global.actions.production_stats, 1)",
"pcall(global.actions.get_production_stats, 1)",
'{ ["a"] = true,["b"] = {\n ["iron-ore"] = 10\n},}',
)
assert result