New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix AbcTest.testAbstract assertion #47512
Fix AbcTest.testAbstract assertion #47512
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the fix!
@@ -335,7 +335,7 @@ def testEntersNameScope_concreteFunction(self): | |||
class AbcTest(test_util.TensorFlowTestCase): | |||
|
|||
def testAbstract(self): | |||
msg = "Can't instantiate .* abstract methods" | |||
msg = "Can't instantiate .* abstract method" | |||
with self.assertRaisesRegex(TypeError, msg): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be ok to me to drop the regex altogether - knowing that a TypeError is raised is more than sufficient for this test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mdanatg FYI - there's a couple instances of assertRaisesRegex
in this test suite, I can remove them all if you'd like?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good. Only those asserts that verify messaged produced by module.py itself should use regexps.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mdanatg seems like this particular test was the only assert that didn't need a regexp assert, so I went ahead and removed it for that test only.
@park-junha can you please check sanity build failures ? |
They look like transient failures. Mind to kick off CI again? |
Fixes the following test failure: