Skip to content

Commit

Permalink
SporeModManager: improve test_update_modapi test in test.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Rosalie241 committed Jul 23, 2024
1 parent f0098b2 commit e57804b
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions SporeModManager/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -639,13 +639,7 @@ def test_update_modapi():
print(f'Running {test_update_modapi.__name__}...')
reset_smm()

# attempt to update modapi dll
result = run_smm([ 'update-modapi' ])
assert result.returncode == 0
assert result.stdout != b''
assert result.stderr == b''

# ensure mod with higher dll build required works
# ensure mod with higher dll build required doesn't work
xml = """<mod displayName="test_update_modapi_0"
unique="test_update_modapi_0"
description="test_update_modapi_0"
Expand All @@ -654,6 +648,18 @@ def test_update_modapi():
</mod>"""
write_sporemod(xml)
result = run_smm([ 'install', sporemod_file ])
assert result.returncode != 0
assert result.stdout == b''
assert result.stderr != b''

# attempt to update modapi dll
result = run_smm([ 'update-modapi' ])
assert result.returncode == 0
assert result.stdout != b''
assert result.stderr == b''

# ensure mod with higher dll build required works
result = run_smm([ 'install', sporemod_file ])
assert result.returncode == 0
assert result.stdout != b''
assert result.stderr == b''
Expand Down

0 comments on commit e57804b

Please sign in to comment.