rofunc.utils.robolab.formatter.mjcf_parser.attribute_test#

Tests for dm_control.mjcf.attribute.

1.  Module Contents#

1.1.  Classes#

AttributeTest

Test for Attribute classes.

1.2.  Data#

ASSETS_DIR

FAKE_SCHEMA_FILENAME

ORIGINAL_SCHEMA_PATH

1.3.  API#

rofunc.utils.robolab.formatter.mjcf_parser.attribute_test.ASSETS_DIR = None#
rofunc.utils.robolab.formatter.mjcf_parser.attribute_test.FAKE_SCHEMA_FILENAME = 'attribute_test_schema.xml'#
rofunc.utils.robolab.formatter.mjcf_parser.attribute_test.ORIGINAL_SCHEMA_PATH = None#
class rofunc.utils.robolab.formatter.mjcf_parser.attribute_test.AttributeTest(*args, **kwargs)[source]#

Bases: absl.testing.parameterized.TestCase

Test for Attribute classes.

Our tests here reflect actual usages of the Attribute classes, namely that we never directly create attributes but instead access them through Elements.

Initialization

Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.

setUp()[source]#
tearDown()[source]#
assertXMLStringIsNone(mjcf_element, attribute_name)[source]#
assertXMLStringEqual(mjcf_element, attribute_name, expected)[source]#
assertXMLStringIsCorrectlyScoped(mjcf_element, attribute_name, expected)[source]#
assertCorrectXMLStringForDefaultsClass(mjcf_element, attribute_name, expected)[source]#
assertElementIsIdentifiedByName(mjcf_element, expected)[source]#
assertAttributeIsNoneWhenDone(mjcf_element, attribute_name)[source]#
assertCorrectClearBehavior(mjcf_element, attribute_name, required)[source]#
assertCorrectClearBehaviorByAllMethods(mjcf_element, attribute_name, required)[source]#
assertCanBeCleared(mjcf_element, attribute_name)[source]#
assertCanNotBeCleared(mjcf_element, attribute_name)[source]#
testFloatScalar()[source]#
testIntScalar()[source]#
testStringScalar()[source]#
testFloatArray()[source]#
testFormatVeryLargeArray()[source]#
testIntArray()[source]#
testKeyword()[source]#
testKeywordFalseTrueAuto()[source]#
testIdentifier()[source]#
testStringReference()[source]#
testElementReferenceWithFixedNamespace()[source]#
testElementReferenceWithVariableNamespace()[source]#
testInvalidReference()[source]#
testDefaults()[source]#
testFileFromPath(basepath, value)#
testFileFromPlaceholder()[source]#
testFileFromAssetsDict()[source]#
testFileExceptions()[source]#
testBasePathExceptions()[source]#
testRequiredAttributes()[source]#