mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 20:21:32 -06:00
Stardew Valley: Fix a bug where locations in logic would disappear from universal tracker as items get sent (#4230)
Co-authored-by: Exempt-Medic <60412657+Exempt-Medic@users.noreply.github.com>
This commit is contained in:
@@ -7,9 +7,6 @@ import unittest
|
||||
from BaseClasses import get_seed
|
||||
from .. import SVTestCase
|
||||
|
||||
# There seems to be 4 bytes that appear at random at the end of the output, breaking the json... I don't know where they came from.
|
||||
BYTES_TO_REMOVE = 4
|
||||
|
||||
# <function Location.<lambda> at 0x102ca98a0>
|
||||
lambda_regex = re.compile(r"^<function Location\.<lambda> at (.*)>$")
|
||||
|
||||
@@ -27,8 +24,8 @@ class TestGenerationIsStable(SVTestCase):
|
||||
output_a = subprocess.check_output([sys.executable, '-m', 'worlds.stardew_valley.test.stability.StabilityOutputScript', '--seed', str(seed)])
|
||||
output_b = subprocess.check_output([sys.executable, '-m', 'worlds.stardew_valley.test.stability.StabilityOutputScript', '--seed', str(seed)])
|
||||
|
||||
result_a = json.loads(output_a[:-BYTES_TO_REMOVE])
|
||||
result_b = json.loads(output_b[:-BYTES_TO_REMOVE])
|
||||
result_a = json.loads(output_a)
|
||||
result_b = json.loads(output_b)
|
||||
|
||||
for i, ((room_a, bundles_a), (room_b, bundles_b)) in enumerate(zip(result_a["bundles"].items(), result_b["bundles"].items())):
|
||||
self.assertEqual(room_a, room_b, f"Bundle rooms at index {i} is different between both executions. Seed={seed}")
|
||||
|
||||
Reference in New Issue
Block a user