提交 da798b78 authored 作者: Brandon T. Willard's avatar Brandon T. Willard 提交者: Thomas Wiecki

Use pytest.mark.skip to skip disabled tests in tests.graph.test_opt

上级 0a41de24
import pytest
import theano.tensor as tt import theano.tensor as tt
from tests.graph.utils import ( from tests.graph.utils import (
MyType, MyType,
...@@ -324,7 +326,8 @@ class TestMergeOptimizer: ...@@ -324,7 +326,8 @@ class TestMergeOptimizer:
strg = str(g) strg = str(g)
assert strg == "FunctionGraph(Op1(y, y))" or strg == "FunctionGraph(Op1(z, z))" assert strg == "FunctionGraph(Op1(y, y))" or strg == "FunctionGraph(Op1(z, z))"
def est_one_assert_merge(self): @pytest.mark.skip(reason="This was disabled for some unknown reason")
def test_one_assert_merge(self):
# Merge two nodes, one has assert, the other not. # Merge two nodes, one has assert, the other not.
x1 = tt.matrix("x1") x1 = tt.matrix("x1")
x2 = tt.matrix("x2") x2 = tt.matrix("x2")
...@@ -370,7 +373,8 @@ class TestMergeOptimizer: ...@@ -370,7 +373,8 @@ class TestMergeOptimizer:
# print(strg) # print(strg)
assert strg == strref, (strg, strref) assert strg == strref, (strg, strref)
def est_both_assert_merge_1(self): @pytest.mark.skip(reason="This was disabled for some unknown reason")
def test_both_assert_merge_1(self):
# Merge two nodes, both have assert on the same node # Merge two nodes, both have assert on the same node
# with different conditions. # with different conditions.
x1 = tt.matrix("x1") x1 = tt.matrix("x1")
...@@ -415,7 +419,8 @@ class TestMergeOptimizer: ...@@ -415,7 +419,8 @@ class TestMergeOptimizer:
# print(strg) # print(strg)
assert strg == strref1 or strg == strref2, (strg, strref1, strref2) assert strg == strref1 or strg == strref2, (strg, strref1, strref2)
def est_both_assert_merge_2(self): @pytest.mark.skip(reason="This was disabled for some unknown reason")
def test_both_assert_merge_2(self):
# Merge two nodes, both have assert on different node # Merge two nodes, both have assert on different node
x1 = tt.matrix("x1") x1 = tt.matrix("x1")
x2 = tt.matrix("x2") x2 = tt.matrix("x2")
...@@ -445,7 +450,8 @@ class TestMergeOptimizer: ...@@ -445,7 +450,8 @@ class TestMergeOptimizer:
# print(strg) # print(strg)
assert strg == strref, (strg, strref) assert strg == strref, (strg, strref)
def est_both_assert_merge_2_reverse(self): @pytest.mark.skip(reason="This was disabled for some unknown reason")
def test_both_assert_merge_2_reverse(self):
# Test case "test_both_assert_merge_2" but in reverse order # Test case "test_both_assert_merge_2" but in reverse order
x1 = tt.matrix("x1") x1 = tt.matrix("x1")
x2 = tt.matrix("x2") x2 = tt.matrix("x2")
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论