Testing
- class helix.tests.UnitTestCase(methodName='runTest')
The base class for all Blueprint, Component, and Transform tests.
Provides utilities for safely generating builds during unit tests.
- setUp()
Hook method for setting up the test fixture before exercising it.
- tearDown()
Hook method for deconstructing the test fixture after testing it.
- build(configuration)
Build a given configuration in the current working directory.
Tests may make use of the build artifacts to determine success/failure by using
utils.run
as necessary.- Parameters
configuration – A build configuration dictionary.
- Returns
A list of build artifacts from the successful build.
- class helix.tests.BlueprintTestCaseMixin
Provides testing utilities and minimal tests for Blueprints.
Note
Requires a base class of
UnitTestCase
.- abstract property blueprint
The Blueprint name.
- test_build_success()
Tests that this Blueprint builds successfully.
Builds this Blueprint on its own with no Components or Transforms. As long as no errors are raised in building, this test will pass.
- class helix.tests.ComponentTestCaseMixin
Provides testing utilities and minimal tests for Components.
Note
Requires a base class of
UnitTestCase
.- abstract property blueprint
The Blueprint that this Component should be built with.
- abstract property component
The Component name.
- configuration = {}
Optional configuration parameters for building.
If the Component requires configuration for a basic build, specify an example configuration here.
- test_build_success()
Tests that this Component builds successfully.
Builds this Component on its own with the configured Blueprint and nothing else. As long as no errors are raised in building, this test will pass.
- test_duplicate_build()
Tests that duplicating this Component builds successfully.
Attempts a minimal build with only this Component, duplicated. This is a useful test to determine if the Component has been parameterized successfully. If not, the build will likely fail with errors complaining about duplicated functions or globals.
- class helix.tests.TransformTestCaseMixin
Provides testing utilities and minimal tests for Transforms.
Note
Requires a base class of
UnitTestCase
.- abstract property blueprint
The Blueprint that this Transform should be built with.
- abstract property transform
The Transform name.
- configuration = {}
Optional configuration parameters for building.
If the Transform requires configuration for a basic build, specify an example configuration here.
- test_build_success()
Tests that this Transform builds successfully.
Builds this Transform on its own with the configured Blueprint and nothing else. As long as no errors are raised in building, this test will pass.