player object
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import pytest
|
||||
|
||||
from untitled import content, migration, model, persistence, rules
|
||||
from untitled import content, model, persistence, rules
|
||||
|
||||
|
||||
def test_save_load_roundtrip(tmp_path):
|
||||
@@ -28,23 +28,23 @@ def test_save_load_roundtrip(tmp_path):
|
||||
assert loaded.version == content.SAVE_VERSION
|
||||
|
||||
|
||||
def test_migration():
|
||||
v1 = {
|
||||
"version": 1,
|
||||
"cat": {
|
||||
"name": "Fry",
|
||||
"traits": {
|
||||
"size": "tiny",
|
||||
"color": "tuxedo",
|
||||
"eyes": "blue",
|
||||
"personality": "judges you silently",
|
||||
},
|
||||
},
|
||||
}
|
||||
result = migration.migrate(v1)
|
||||
assert result["version"] == content.SAVE_VERSION
|
||||
assert result["cat"]["fullness"] == 100
|
||||
assert "last_updated" in result["cat"]
|
||||
# def test_migration():
|
||||
# v1 = {
|
||||
# "version": 1,
|
||||
# "cat": {
|
||||
# "name": "Fry",
|
||||
# "traits": {
|
||||
# "size": "tiny",
|
||||
# "color": "tuxedo",
|
||||
# "eyes": "blue",
|
||||
# "personality": "judges you silently",
|
||||
# },
|
||||
# },
|
||||
# }
|
||||
# result = migration.migrate(v1)
|
||||
# assert result["version"] == content.SAVE_VERSION
|
||||
# assert result["cat"]["fullness"] == 100
|
||||
# assert "last_updated" in result["cat"]
|
||||
|
||||
|
||||
def test_decay_and_replenish():
|
||||
|
||||
Reference in New Issue
Block a user