test.generic.test_generators module¶
Tests the Generator building blocks to prove validity w.r.t. these tests.
Every test will run a PythonPDEVS simulation on a model. This model will afterwards be analyzed against the expected measures. The model has a general shape of
Generator -> TableCollector
See also
-
class
test.generic.test_generators.GenModel(gen=None)[source]¶ Bases:
pypdevs.DEVS.CoupledDEVSSimple model constructor for the tests.
Parameters: gen – The generator to use.
-
test.generic.test_generators.simulate(gen, tt=None)[source]¶ Simulates the model.
Parameters: - gen – The generator to use.
- tt (numeric) – The termination time or
Noneif no termination time needs to be set. Defaults toNone.
-
class
test.generic.test_generators.TestGenerators(methodName='runTest')[source]¶ Bases:
unittest.case.TestCase-
test_table()[source]¶ Tests the
pypdevsbbl.generic.generators.TableGenerator.
-
test_table_repeat()[source]¶ Tests the
pypdevsbbl.generic.generators.TableGeneratorwith a repeat.
-
test_singlefire()[source]¶ Tests the
pypdevsbbl.generic.generators.SingleFire.
-
test_bulk()[source]¶ Tests the
pypdevsbbl.generic.generators.BulkGenerator.
-