@@ -1986,28 +1986,37 @@ class TestRoboHive:
1986
1986
# In the CI, robohive should not coexist with other libs so that's fine.
1987
1987
# Locally these imports can be annoying, especially given the amount of
1988
1988
# stuff printed by robohive.
1989
- @pytest .mark .parametrize ("envname" , RoboHiveEnv .available_envs )
1990
1989
@pytest .mark .parametrize ("from_pixels" , [True , False ])
1991
1990
@set_gym_backend ("gym" )
1992
- def test_robohive (self , envname , from_pixels ):
1993
- if any (substr in envname for substr in ("_vr3m" , "_vrrl" , "_vflat" , "_vvc1s" )):
1994
- print ("not testing envs with prebuilt rendering" )
1995
- return
1996
- if "Adroit" in envname :
1997
- print ("tcdm are broken" )
1998
- return
1999
- try :
2000
- env = RoboHiveEnv (envname )
2001
- except AttributeError as err :
2002
- if "'MjData' object has no attribute 'get_body_xipos'" in str (err ):
2003
- print ("tcdm are broken" )
2004
- return
2005
- else :
2006
- raise err
2007
- if from_pixels and len (RoboHiveEnv .get_available_cams (env_name = envname )) == 0 :
2008
- print ("no camera" )
2009
- return
2010
- check_env_specs (env )
1991
+ def test_robohive (self , from_pixels ):
1992
+ for envname in RoboHiveEnv .available_envs :
1993
+ try :
1994
+ if any (
1995
+ substr in envname
1996
+ for substr in ("_vr3m" , "_vrrl" , "_vflat" , "_vvc1s" )
1997
+ ):
1998
+ print ("not testing envs with prebuilt rendering" )
1999
+ return
2000
+ if "Adroit" in envname :
2001
+ print ("tcdm are broken" )
2002
+ return
2003
+ try :
2004
+ env = RoboHiveEnv (envname )
2005
+ except AttributeError as err :
2006
+ if "'MjData' object has no attribute 'get_body_xipos'" in str (err ):
2007
+ print ("tcdm are broken" )
2008
+ return
2009
+ else :
2010
+ raise err
2011
+ if (
2012
+ from_pixels
2013
+ and len (RoboHiveEnv .get_available_cams (env_name = envname )) == 0
2014
+ ):
2015
+ print ("no camera" )
2016
+ return
2017
+ check_env_specs (env )
2018
+ except Exception as err :
2019
+ raise RuntimeError (f"Test with robohive end { envname } failed." ) from err
2011
2020
2012
2021
2013
2022
@pytest .mark .skipif (not _has_smacv2 , reason = "SMACv2 not found" )
0 commit comments