Skip to content

Commit

Permalink
Unit tests for mesh particles for dressing env
Browse files Browse the repository at this point in the history
  • Loading branch information
YoruCathy committed Sep 19, 2024
1 parent 6f0b816 commit e28119c
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions tests/test_dressing_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,19 @@ def test_dressing_env_initialization():
"""Tests that the dressing environment initializes without crashing."""
env = DressingEnv(graphics=False)
assert isinstance(env, DressingEnv)

def test_dressing_env_cloth_access():
"""Tests that the cloth is present in the dressing environment."""
env = DressingEnv(graphics=False)
cloth = env.get_cloth()
assert cloth is not None

def test_dressing_env_cloth_particles():
"""Tests that the cloth particles are present in the dressing environment."""
env = DressingEnv(graphics=False)
cloth = env.get_cloth()
cloth.GetParticles()
env.step()
cloth_particles = cloth.data['particles'] # Assuming cloth has a 'data' attribute with 'particles'
assert cloth_particles is not None
assert len(cloth_particles) > 0 # Ensure there are particles present

0 comments on commit e28119c

Please sign in to comment.