Skip to content

Commit

Permalink
Merge pull request #8419 from toslunar/xfail-backward
Browse files Browse the repository at this point in the history
Use `fix_random` in xfail backward tests
  • Loading branch information
mergify[bot] committed Nov 13, 2019
2 parents e60291c + 5b7f49b commit 6fb2fc4
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/chainer_tests/testing_tests/test_function_link.py
Expand Up @@ -343,6 +343,7 @@ def backward(self, indexes, grad_outputs):
@testing.parameterize(*testing.product({
'shape': [(3, 2), (2,), (1,), ()],
}))
@testing.fix_random()
@_inject_backend_tests
@pytest.mark.xfail(strict=True, raises=testing.FunctionTestError)
class TestFunctionTestIncorrectBackward(testing.FunctionTestCase):
Expand All @@ -362,6 +363,7 @@ def forward_expected(self, inputs):
return _forward_correct(*inputs)


@testing.fix_random()
@_inject_backend_tests
@pytest.mark.xfail(strict=True, raises=testing.FunctionTestError)
class TestFunctionTestIncorrectBackwardNoneGrads(testing.FunctionTestCase):
Expand Down Expand Up @@ -450,6 +452,7 @@ def backward(self, indexes, grad_grad_inputs):
@testing.parameterize(*testing.product({
'shape': [(3, 2), (2,), (1,), ()],
}))
@testing.fix_random()
@_inject_backend_tests
@pytest.mark.xfail(strict=True, raises=testing.FunctionTestError)
class TestFunctionTestIncorrectDoubleBackward(testing.FunctionTestCase):
Expand All @@ -469,6 +472,7 @@ def forward_expected(self, inputs):
return _forward_correct(*inputs)


@testing.fix_random()
@_inject_backend_tests
@pytest.mark.xfail(strict=True, raises=testing.FunctionTestError)
class TestFunctionTestIncorrectDoubleBackwardNoneGrads(
Expand Down Expand Up @@ -795,6 +799,7 @@ def create_link(self, initializers):
return link


@testing.fix_random()
@_inject_backend_tests
@pytest.mark.xfail(strict=True, raises=testing.LinkTestError)
class TestLinkIncorrectBackwardInput(DotLinkTestBase, testing.LinkTestCase):
Expand All @@ -810,6 +815,7 @@ def create_link(self, initializers):
return link


@testing.fix_random()
@_inject_backend_tests
@pytest.mark.xfail(strict=True, raises=testing.LinkTestError)
class TestLinkIncorrectBackwardParam(DotLinkTestBase, testing.LinkTestCase):
Expand Down

0 comments on commit 6fb2fc4

Please sign in to comment.