def test_random_norm(self): random.seed(0) shape = (4, 3) matrix = array([[0.29399155, 0.38311672, 0.32289173], [0.33750765, 0.26241723, 0.40007512], [0.1908342, 0.38890714, 0.42025866], [0.22501625, 0.46461061, 0.31037314]]) self.assertTrue( array_equal(around(MarkovModel._random_norm(shape), decimals=3), around(matrix, decimals=3)))