Tests DFA

List

TestDfaWordAcceptance([methodName])
TestDfaCompletion([methodName])
TestDfaComplementation([methodName])
TestDfaIntersection([methodName])
TestDfaUnion([methodName])
TestDfaMinimization([methodName])
TestDfaReachable([methodName])
TestDfaCoReachable([methodName])
TestDfaTrimming([methodName])
TestDfaProjection([methodName])
TestDfaNonemptinessCheck([methodName])

Functions

class tests.test_DFA.TestDfaCoReachable(methodName='runTest')[source]

Bases: unittest.case.TestCase

setUp()[source]

Hook method for setting up the test fixture before exercising it.

test_dfa_co_reachable()[source]

Tests making correctly co_reachable a DFA

test_dfa_co_reachable_already_co_reachable()[source]

Tests making co_reachable a DFA even if its already completely co_reachable

test_dfa_co_reachable_empty_states()[source]

Tests making co_reachable a DFA without states

test_dfa_co_reachable_empty_transitions()[source]

Tests making co_reachable a DFA without transitions

test_dfa_co_reachable_no_accepting_state_co_reachable()[source]

Tests making co_reachable a DFA where the initial state doesn’t reach any accepting state

test_dfa_co_reachable_side_effects()[source]

Tests the function makes side effects on input

test_dfa_co_reachable_side_effects_copy()[source]

Tests the function doesn’t make side effects if a copy is passed as input

test_dfa_co_reachable_wrong_dict()[source]

Tests a dict() in input different from a well formatted dict() representing a DFA. [EXPECTED FAILURE]

test_dfa_co_reachable_wrong_input()[source]

Tests an input different from a dict() object. [ EXPECTED FAILURE]

class tests.test_DFA.TestDfaComplementation(methodName='runTest')[source]

Bases: unittest.case.TestCase

setUp()[source]

Hook method for setting up the test fixture before exercising it.

test_dfa_complementation()[source]

Tests a correct complementation.

test_dfa_complementation_empty_states()[source]

Tests a complementation on a DFA without states.

test_dfa_complementation_empty_transitions()[source]

Tests a complementation on a DFA without transitions.

test_dfa_complementation_side_effects()[source]

Tests the function doesn’t make side effects on input

test_dfa_complementation_wrong_dict()[source]

Tests a dict() in input different from a well formatted dict() representing a DFA. [EXPECTED FAILURE]

test_dfa_complementation_wrong_input()[source]

Tests an input different from a dict() object. [ EXPECTED FAILURE]

class tests.test_DFA.TestDfaCompletion(methodName='runTest')[source]

Bases: unittest.case.TestCase

setUp()[source]

Hook method for setting up the test fixture before exercising it.

test_dfa_completion()[source]

Tests a correct completion

test_dfa_completion_empty_states()[source]

Tests a completion of a dfa without states

test_dfa_completion_empty_transitions()[source]

Tests a completion of a dfa without transitions

test_dfa_completion_side_effects()[source]

Tests the function correctly makes side effects on input

test_dfa_completion_side_effects_copy()[source]

Tests the function doesn’t make side effects if a copy is passed as input

test_dfa_completion_wrong_dict()[source]

Tests a dict() in input different from a well formatted dict() representing a DFA. [EXPECTED FAILURE]

test_dfa_completion_wrong_input()[source]

Tests an input different from a dict() object. [ EXPECTED FAILURE]

class tests.test_DFA.TestDfaIntersection(methodName='runTest')[source]

Bases: unittest.case.TestCase

setUp()[source]

Hook method for setting up the test fixture before exercising it.

test_dfa_intersection_disjoint()[source]

Tests a correct intersection between disjointed DFAs

test_dfa_intersection_equals()[source]

Tests a correct intersection between the same DFA

test_dfa_intersection_intersecting()[source]

Tests a correct intersection between DFAs partially intersected

test_dfa_intersection_side_effects_alphabet()[source]

Tests that the intersection function doesn’t make side effects on input DFAs alphabet

test_dfa_intersection_side_effects_initial_state()[source]

Tests that the intersection function doesn’t make side effects on input DFAs initial state

test_dfa_intersection_wrong_dict_1()[source]

Tests a dict() in input different from a well formatted dict() representing a DFA. [EXPECTED FAILURE]

test_dfa_intersection_wrong_dict_2()[source]

Tests a dict() in input different from a well formatted dict() representing a DFA. [EXPECTED FAILURE]

test_dfa_intersection_wrong_input_1()[source]

Tests an input different from a dict() object. [EXPECTED FAILURE]

test_dfa_intersection_wrong_input_2()[source]

Tests an input different from a dict() object. [EXPECTED FAILURE]

class tests.test_DFA.TestDfaMinimization(methodName='runTest')[source]

Bases: unittest.case.TestCase

setUp()[source]

Hook method for setting up the test fixture before exercising it.

test_dfa_minimization()[source]

Tests correct DFA minimization

test_dfa_minimization_already_minimized()[source]

Tests the minimization of a DFA already minimal

test_dfa_minimization_empty_states()[source]

Tests a minimization with a dfa without states

test_dfa_minimization_empty_transitions()[source]

Tests a minimization with a dfa without transitions

test_dfa_minimization_side_effects()[source]

Tests the function doesn’t make side effects on input

test_dfa_minimization_wrong_dict()[source]

Tests a dict() in input different from a well formatted dict() representing a DFA. [EXPECTED FAILURE]

test_dfa_minimization_wrong_input()[source]

Tests an input different from a dict() object. [ EXPECTED FAILURE]

class tests.test_DFA.TestDfaNonemptinessCheck(methodName='runTest')[source]

Bases: unittest.case.TestCase

setUp()[source]

Hook method for setting up the test fixture before exercising it.

test_dfa_nonemptiness_check()[source]

Tests correctly the nonemptiness of the input

test_dfa_nonemptiness_check_empty()[source]

Tests the nonemptines of an empty dfa

test_dfa_nonemptiness_check_false()[source]

Tests correctly the emptiness of the input

test_dfa_nonemptiness_check_side_effects()[source]

Tests that the function doesn’t make any side effect on the input

test_dfa_nonemptiness_check_wromg_dict_format()[source]

Tests the nonemptines of a dfa dict object with inconsistent data (transitions not present in alphabet). [EXPECTED FAILURE]

test_dfa_nonemptiness_check_wrong_dict()[source]

Tests the nonemptines of an input dict different from a dict representing a dfa. [EXPECTED FAILURE]

test_dfa_nonemptiness_check_wrong_input()[source]

Tests the nonemptines of an input different from a dict object. [EXPECTED FAILURE]

class tests.test_DFA.TestDfaProjection(methodName='runTest')[source]

Bases: unittest.case.TestCase

setUp()[source]

Hook method for setting up the test fixture before exercising it.

test_dfa_projection()[source]

Tests a correct dfa projection

test_dfa_projection_empty_words()[source]

Tests a dfa projection without word o project out

test_dfa_projection_full_alphabet_projection()[source]

Tests a dfa projection where all the symbols of the alphabets got projected out

test_dfa_projection_side_effects()[source]

Tests the function doesn’t make side effects on input

test_dfa_projection_words_not_in_alphabet()[source]

Tests a dfa projection with word not present in the dfa alphabet

test_dfa_projection_wrong_dict()[source]

Tests a dfa projection where the first input is different from a well formatted dict representing a dfa. [EXPECTED FAILURE]

test_dfa_projection_wrong_input_1()[source]

Tests a dfa projection where the first input is different from a dict representing a dfa. [EXPECTED FAILURE]

test_dfa_projection_wrong_input_2()[source]

Tests a dfa projection where the second input is different from a set of word. [EXPECTED FAILURE]

class tests.test_DFA.TestDfaReachable(methodName='runTest')[source]

Bases: unittest.case.TestCase

setUp()[source]

Hook method for setting up the test fixture before exercising it.

test_dfa_reachable()[source]

Tests making correctly reachable a DFA

test_dfa_reachable_already_reachable()[source]

Tests making reachable a DFA even if its already completely reachable

test_dfa_reachable_empty_states()[source]

Tests making reachable a DFA without states

test_dfa_reachable_empty_transitions()[source]

Tests making reachable a DFA without transitions

test_dfa_reachable_no_accepting_state_reachable()[source]

Tests making reachable a DFA where no accepting state is reached by the initial state

test_dfa_reachable_side_effects()[source]

Tests the function makes side effects on input

test_dfa_reachable_side_effects_copy()[source]

Tests the function doesn’t make side effects if a copy is passed as input

test_dfa_reachable_wrong_dict()[source]

Tests a dict() in input different from a well formatted dict() representing a DFA. [EXPECTED FAILURE]

test_dfa_reachable_wrong_input()[source]

Tests an input different from a dict() object. [ EXPECTED FAILURE]

class tests.test_DFA.TestDfaTrimming(methodName='runTest')[source]

Bases: unittest.case.TestCase

setUp()[source]

Hook method for setting up the test fixture before exercising it.

test_dfa_trimming()[source]

Tests a correct trimming of a dfa

test_dfa_trimming_empty_states()[source]

Tests trimming a DFA without states

test_dfa_trimming_empty_transitions()[source]

Tests trimming a DFA without transitions

test_dfa_trimming_non_reachable_non_co_reachable()[source]

Tests trimming a DFA without transitions

test_dfa_trimming_side_effects()[source]

Tests the function makes side effects on input

test_dfa_trimming_side_effects_copy()[source]

Tests the function doesn’t make side effects if a copy is passed as input

class tests.test_DFA.TestDfaUnion(methodName='runTest')[source]

Bases: unittest.case.TestCase

setUp()[source]

Hook method for setting up the test fixture before exercising it.

test_dfa_union_disjoint()[source]

Tests a correct union between disjointed DFAs

test_dfa_union_equals()[source]

Tests a correct union between the same DFA

test_dfa_union_intersecting()[source]

Tests a correct union between DFAs partially intersected

test_dfa_union_side_effects()[source]

Tests that the union function doesn’t make side effects on input DFAs

test_dfa_union_wrong_dict_1()[source]

Tests a dict() in input different from a well formatted dict() representing a DFA. [EXPECTED FAILURE]

test_dfa_union_wrong_dict_2()[source]

Tests a dict() in input different from a well formatted dict() representing a DFA. [EXPECTED FAILURE]

test_dfa_union_wrong_input_1()[source]

Tests an input different from a dict() object. [ EXPECTED FAILURE]

test_dfa_union_wrong_input_2()[source]

Tests an input different from a dict() object. [ EXPECTED FAILURE]

class tests.test_DFA.TestDfaWordAcceptance(methodName='runTest')[source]

Bases: unittest.case.TestCase

setUp()[source]

Hook method for setting up the test fixture before exercising it.

test_word_acceptance()[source]

Tests a correct word

test_word_acceptance_empty_word()[source]

Tests an empty word

test_word_acceptance_false()[source]

Tests a non correct word, with good alphabet

test_word_acceptance_wrong_alphabet()[source]

Tests a non correct word, with letters not form the dfa alphabet

test_word_acceptance_wrong_dict()[source]

Tests a dict() in input different from a well formatted dict() representing a DFA. [EXPECTED FAILURE]

test_word_acceptance_wrong_input_1()[source]

Tests an input different from a dict() object. [ EXPECTED FAILURE]

test_word_acceptance_wrong_input_2()[source]

Tests an input different from a list() object. [ EXPECTED FAILURE]

class tests.test_DFA.TestRenameDfaStates(methodName='runTest')[source]

Bases: unittest.case.TestCase

setUp()[source]

Hook method for setting up the test fixture before exercising it.

test_rename_dfa_states()[source]

Tests a correct DFA states renaming