# test.generic.test_generators module — Python(P)DEVS-BBL documentation

# 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

`pypdevsbbl.generic.generators`

class `test.generic.test_generators.``GenModel`(gen=None)

  Bases: `pypdevs.DEVS.CoupledDEVS`

  Simple model constructor for the tests.

  Parameters: | gen – The generator to use.

`test.generic.test_generators.``simulate`(gen, tt=None)

  Simulates the model.

  Parameters:

  - gen – The generator to use.
  - tt (numeric) – The termination time or `None` if no termination time needs to be set. Defaults to `None`.

class `test.generic.test_generators.``TestGenerators`(methodName='runTest')

  Bases: `unittest.case.TestCase`

  `test_constant`()

    Tests the `pypdevsbbl.generic.generators.ConstantGenerator`.

  `test_function`()

    Tests the `pypdevsbbl.generic.generators.FunctionGenerator`.

  `test_table`()

    Tests the `pypdevsbbl.generic.generators.TableGenerator`.

  `test_table_repeat`()

    Tests the `pypdevsbbl.generic.generators.TableGenerator` with a repeat.

  `test_singlefire`()

    Tests the `pypdevsbbl.generic.generators.SingleFire`.

  `test_bulk`()

    Tests the `pypdevsbbl.generic.generators.BulkGenerator`.