Test Classes¶
Note
These classes provide extra types of tests that can be used in tunables.
Test Set Instance¶
- class S4CLTestSetInstance(*args, **kwargs)¶
Bases:
CommonTestSetInstanceA tunable test set instance. This instance provides extra tests that can be used in TestSetInstance tunable snippets.
Test Set¶
- class S4CLTunableTestSet(tunable_test_variant_class=<class 'sims4communitylib.classes.testing.common_test_set_instance.S4CLTunableTestVariant'>, test_locked_args=None, **kwargs)¶
Bases:
CommonTunableTestSetA tunable test set for S4CL. This instance is used within other types of custom Tunables, such as custom LootActions.
Subject Test¶
- class CommonSubjectTest(*args, **kwargs)¶
Bases:
CommonTestA tunable test with a Subject. Obsolete, please use the sub variants instead, such as CommonSubjectSimTest or CommonSubjectGameObjectTest
- get_expected_args()¶
The values expected to be passed to the test.
- Return type:
Dict[str,Any]
- classmethod get_log_identifier()¶
A string identifier for the log of the class.
Note
This is the text that will appear when logging messages.
- Returns:
The identifier for the log
- Return type:
str
- classmethod get_mod_identity()¶
Retrieve the identity of the mod that owns the class.
Warning
Override this function with the
CommonModIdentityof your mod.This is a MUST override to allow for proper Exception Handling and Logging!
- Returns:
An instance of CommonModIdentity
- Return type:
- Raises:
NotImplementedError – Thrown when the function is not implemented.
Subject Target Test¶
- class CommonSubjectTargetTest(*args, **kwargs)¶
Bases:
CommonSubjectTestA tunable test with a target and subject. Obsolete, please use the sub variants instead, such as CommonSubjectSimTargetSimTest or CommonSubjectSimTargetGameObjectTest
- get_expected_args()¶
The values expected to be passed to the test.
- Return type:
Dict[str,Any]
- classmethod get_log_identifier()¶
A string identifier for the log of the class.
Note
This is the text that will appear when logging messages.
- Returns:
The identifier for the log
- Return type:
str
- classmethod get_mod_identity()¶
Retrieve the identity of the mod that owns the class.
Warning
Override this function with the
CommonModIdentityof your mod.This is a MUST override to allow for proper Exception Handling and Logging!
- Returns:
An instance of CommonModIdentity
- Return type:
- Raises:
NotImplementedError – Thrown when the function is not implemented.
Resolver Test¶
- class CommonResolverTest(*args, **kwargs)¶
Bases:
CommonTestA tunable test with a resolver.
- get_expected_args()¶
The values expected to be passed to the test.
- Return type:
Dict[str,Any]
- classmethod get_log_identifier()¶
A string identifier for the log of the class.
Note
This is the text that will appear when logging messages.
- Returns:
The identifier for the log
- Return type:
str
- classmethod get_mod_identity()¶
Retrieve the identity of the mod that owns the class.
Warning
Override this function with the
CommonModIdentityof your mod.This is a MUST override to allow for proper Exception Handling and Logging!
- Returns:
An instance of CommonModIdentity
- Return type:
- Raises:
NotImplementedError – Thrown when the function is not implemented.