Skip to content

Commit

Permalink
Remove bathing test in test save scene
Browse files Browse the repository at this point in the history
  • Loading branch information
YoruCathy committed Oct 29, 2024
1 parent ab220e0 commit cbbb519
Showing 1 changed file with 25 additions and 25 deletions.
50 changes: 25 additions & 25 deletions tests/test_save_scene.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,31 +38,31 @@ def test_save_scene():
assert os.path.exists("template/Dressing/DressingPlayer_Data")
assert os.path.exists("template/Dressing/DressingPlayer_Data/StreamingAssets/SceneData/helpme.json")

env = BathingEnv(assets=["Collider_Box", "Rigidbody_Sphere"], graphics=False)
# env = BathingEnv(assets=["Collider_Box", "Rigidbody_Sphere"], graphics=False)

box1 = env.InstanceObject(name="Collider_Box", attr_type=attr.ColliderAttr)
box1.SetTransform(position=[-0.5, 0.5, 0], scale=[0.1, 1, 1])
box2 = env.InstanceObject(name="Collider_Box", attr_type=attr.ColliderAttr)
box2.SetTransform(position=[0.5, 0.5, 0], scale=[0.1, 1, 1])
box3 = env.InstanceObject(name="Collider_Box", attr_type=attr.ColliderAttr)
box3.SetTransform(position=[0, 0.5, 0.5], scale=[1, 1, 0.1])
box4 = env.InstanceObject(name="Collider_Box", attr_type=attr.ColliderAttr)
box4.SetTransform(position=[0, 0.5, -0.5], scale=[1, 1, 0.1])
sphere = env.InstanceObject(name="Rigidbody_Sphere", attr_type=attr.RigidbodyAttr)
sphere.SetTransform(position=[0, 0.5, 0], scale=[0.5, 0.5, 0.5])
# env.ClearScene()
env.step(1)
env.SaveScene("helpme.json")
env.step(1)
env.close()
# env.ClearScene()
# env.Pend()
# box1 = env.InstanceObject(name="Collider_Box", attr_type=attr.ColliderAttr)
# box1.SetTransform(position=[-0.5, 0.5, 0], scale=[0.1, 1, 1])
# box2 = env.InstanceObject(name="Collider_Box", attr_type=attr.ColliderAttr)
# box2.SetTransform(position=[0.5, 0.5, 0], scale=[0.1, 1, 1])
# box3 = env.InstanceObject(name="Collider_Box", attr_type=attr.ColliderAttr)
# box3.SetTransform(position=[0, 0.5, 0.5], scale=[1, 1, 0.1])
# box4 = env.InstanceObject(name="Collider_Box", attr_type=attr.ColliderAttr)
# box4.SetTransform(position=[0, 0.5, -0.5], scale=[1, 1, 0.1])
# sphere = env.InstanceObject(name="Rigidbody_Sphere", attr_type=attr.RigidbodyAttr)
# sphere.SetTransform(position=[0, 0.5, 0], scale=[0.5, 0.5, 0.5])
# # env.ClearScene()
# env.step(1)
# env.SaveScene("helpme.json")
# env.step(1)
# env.close()
# # env.ClearScene()
# # env.Pend()

# Wait for file to write...
# for _ in range(300):
# env.step()
# # Wait for file to write...
# # for _ in range(300):
# # env.step()

current_dir = os.getcwd()
print(f"Current working directory: {current_dir}")
assert os.path.exists("template/Bathing/BathingPlayer_Data")
assert os.path.exists("template/Bathing/BathingPlayer_Data/StreamingAssets/SceneData/helpme.json")
# current_dir = os.getcwd()
# print(f"Current working directory: {current_dir}")
# assert os.path.exists("template/Bathing/BathingPlayer_Data")
# assert os.path.exists("template/Bathing/BathingPlayer_Data/StreamingAssets/SceneData/helpme.json")

0 comments on commit cbbb519

Please sign in to comment.