Exemplo n.º 1
0
def pdfa_one_state():
    """Get a PDFA with one state."""
    return make_pdfa_one_state()
Exemplo n.º 2
0
def test_multiprocess_generator_helper_function():
    """Test multiprocess generator helper function."""
    automaton = make_pdfa_one_state()
    sample = MultiprocessedGenerator._job(10, SimpleGenerator(automaton).sample)
    assert len(sample) == 10
    assert all(character in {0, 1, FINAL_SYMBOL} for s in sample for character in s)
Exemplo n.º 3
0
 def _make_automaton(cls) -> PDFA:
     """Make automaton."""
     return make_pdfa_one_state()
Exemplo n.º 4
0
 def make_automaton(self) -> PDFA:
     """Make a PDFA to generate samples from."""
     automaton = make_pdfa_one_state()
     return automaton