def test_good_case_2(self): # same fsas s_a = r''' 0 1 1 0 0 2 2 0 1 2 3 0 1 3 4 0 2 3 5 0 3 ''' fsa_a = k2host.str_to_fsa(s_a) self.assertTrue(k2host.is_rand_equivalent(fsa_a, fsa_a))
def test_good_case_1(self): # both fsas will be empty after trimming s_a = r''' 0 1 1 0 0 2 2 0 1 2 3 0 3 ''' fsa_a = k2host.str_to_fsa(s_a) s_b = r''' 0 1 1 0 0 2 2 0 3 ''' fsa_b = k2host.str_to_fsa(s_b) self.assertTrue(k2host.is_rand_equivalent(fsa_a, fsa_b))
def test_bad_case_1(self): # just set arc.weight as 0 since we won't use it here s_a = r''' 0 1 1 0 0 2 2 0 1 2 3 0 1 3 4 0 2 3 5 0 3 ''' fsa_a = k2host.str_to_fsa(s_a) s_b = r''' 0 1 1 0 0 2 2 0 1 2 3 0 3 ''' fsa_b = k2host.str_to_fsa(s_b) self.assertFalse(k2host.is_rand_equivalent(fsa_a, fsa_b))
def test_bad_case_2(self): s_a = r''' 0 1 1 0 0 2 2 0 1 2 3 0 1 3 4 0 2 3 5 0 3 ''' fsa_a = k2host.str_to_fsa(s_a) s_b = r''' 0 1 1 0 0 2 2 0 1 2 3 0 1 3 4 0 2 3 6 0 3 ''' fsa_b = k2host.str_to_fsa(s_b) self.assertFalse(k2host.is_rand_equivalent(fsa_a, fsa_b, 100))
def test_bad_case_2(self): s_a = r''' 0 1 1 0 0 2 2 0 0 3 8 0 1 4 4 0 2 4 5 0 4 ''' fsa_a = k2host.str_to_fsa(s_a) s_b = r''' 0 2 1 0 0 1 2 0 0 3 9 0 1 4 5 0 2 4 4 0 4 ''' fsa_b = k2host.str_to_fsa(s_b) self.assertTrue(k2host.is_rand_equivalent(fsa_a, fsa_b))