Tests - AriosJentu/TestingDocumentGenerator GitHub Wiki

There is some information about tests with exercises.

Classes

There is only one class with possibility to generate tests with exercises:

  • Test — class of tests which containing list of objects of Exercise class.

Usage in Assignment definitions

Tests can be obtained with importing Imports module from Modules:

import Modules.Imports as Imports

Main class contained in Imports.Tests module.

Tests

Test

Test class can generate tests with exercises, which can be obtained with Exercises class.

test = Imports.Tests.Test([exercise1, exercise2])

Also, it's possible to use next syntax:

test = Imports.Tests.Test()
test.append(exercise1)
test.append(exercise2)

This example generates test with two exercises.