Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unit tests for mesh particles for dressing env #123

Merged
merged 1 commit into from
Sep 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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