コード例 #1
0
    def factor_test(self):
        X = RandVar("X", [0, 1])
        Y = RandVar("Y", [0, 1])

        f1 = Factor(X, [0, 1])
        f2 = Factor([X, Y], [0, 1, 2, 3])

        assert (f1.__repr__() == "(X, [0, 1])")
        assert (f2.__repr__() == "([X, Y], [0, 1, 2, 3])")
コード例 #2
0
ファイル: str_repr_tests.py プロジェクト: awesomebytes/ProbPy
    def factor_test(self):
        X = RandVar("X", [0, 1])
        Y = RandVar("Y", [0, 1])

        f1 = Factor(X, [0, 1])
        f2 = Factor([X, Y], [0, 1, 2, 3])

        assert(f1.__repr__() == "(X, [0, 1])")
        assert(f2.__repr__() == "([X, Y], [0, 1, 2, 3])")