10 lines
679 B
Python
10 lines
679 B
Python
|
|
from spriteforge.studio.models import Asset
|
||
|
|
from spriteforge.studio.store import ProjectStore
|
||
|
|
|
||
|
|
|
||
|
|
def test_clone_keeps_grid_and_refs_but_not_candidates(tmp_path):
|
||
|
|
store=ProjectStore.create(tmp_path/"s","ops","Ops");store.add_asset(Asset(id="body",name="Body",kind="character",target_width=60,target_height=60,layer_group="agent"));store.add_shot_grid("body","walk",8,4)
|
||
|
|
project=store.clone_asset("body","armor","Armor");clone=next(a for a in project.assets if a.id=="armor")
|
||
|
|
assert len(clone.shots)==32 and all(not s.candidates for s in clone.shots) and clone.layer_group=="agent"
|
||
|
|
project=store.delete_asset("body");assert [a.id for a in project.assets]==["armor"]
|