Skip to content

Commit 03e0d7a

Browse files
sdaultonfacebook-github-bot
authored andcommitted
fix type error message regex for py 3.9 (#2142)
Summary: Pull Request resolved: #2142 py3.9 does not include the class name in the error message Reviewed By: esantorella Differential Revision: D51983682 fbshipit-source-id: b021afd10fdd9b408c4f11ca8a0cc2fc91702cb4
1 parent b717268 commit 03e0d7a

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

test/acquisition/test_monte_carlo.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -816,10 +816,7 @@ def test_q_simple_regret_constraints(self):
816816
samples = torch.zeros(2, 2, 1, device=self.device, dtype=torch.double)
817817
samples[0, 0, 0] = 1.0
818818
mm = MockModel(MockPosterior(samples=samples))
819-
regex = (
820-
r"qSimpleRegret\.__init__\(\) got an unexpected keyword argument "
821-
r"'constraints'"
822-
)
819+
regex = r"__init__\(\) got an unexpected keyword argument 'constraints'"
823820
with self.assertRaisesRegex(TypeError, regex):
824821
qSimpleRegret(model=mm, constraints=[lambda Y: Y[..., 0]])
825822

0 commit comments

Comments
 (0)