def test_resolution_pathfail_0(self): """Should raise error if randon_index set to False and index not set or not set to int""" bw = BraidWord([1, 2, 3]) with self.assertRaises(ValueError) as te: bw.resolution(random_index=False)
def test_resolution_pathsuccess_1(self): """Should return new BraidWord with manually set generator cut out""" bw = BraidWord([1, 2, 3]) newbraidword = bw.resolution(random_index=False, index=1) # Check that word length shortened by one self.assertEqual(newbraidword.word, [1, 3])
def test_resolution_pathsuccess_0(self): """Should return new BraidWord with random generator cut out""" bw = BraidWord([1, 2, 3]) newbraidword = bw.resolution() # Check that word length shortened by one self.assertEqual(newbraidword.length(), 2)