Unit Tests for Singularity Builder Class
Unittests for the singularity_builder and the __main__ module.
This project is developed by using test driven design.
-
class
test_singularity_builder.
TestMain
(methodName='runTest')[source]
Test the main Function and its helpers
-
test_arg_parser
()[source]
Test the function to parse command line arguments.
-
test_bad_recipe
()[source]
Test if main can handle a ‘bad’ recipe file.
-
test_main
()[source]
Test the main function that enables execution from command line.
-
class
test_singularity_builder.
TestSingularityBuilder
(methodName='runTest')[source]
Test the script used to build singularity images.
-
test__init__
()[source]
Test instantiation of Builder object.
- Builder should have specified arguments
- Builder should create specified attributes
-
test__init__exception
()[source]
Tests exceptions thrown at instantiation.
-
test_build
()[source]
Test building of the image.
- If return values of build() are as expected.
- If image File exists at the location specified in the build() return value.
- If the file has the expected file extension.
-
test_is_build
()[source]
Test the instance function to check if image already exists.