Conversation
The test cases use a serialized module in incremental mode in various ways to make sure that all important information in the AST nodes is preserved during serialization and deserialization. These are all very straightforward. The idea is to help catch regressions early and to make it easier to refactor or optimize serialization code. These found 2 issues -- separated the first to PR #3275. The second issue (#3274) is still unfixed and there is a skipped test case for it. More complex cases such as import cycles will still go to check-incremental.test.
mypy/test/testcheck.py
Outdated
| try: | ||
| self.run_case_once(testcase, 1) | ||
| self.run_case_once(testcase, 2) | ||
| finally: |
There was a problem hiding this comment.
There are now three try/finally blocks in this function that resture experiments.STRICT_OPTIONAL. Let's have a single one that does this, wrapping all different cases.
| @@ -0,0 +1,1202 @@ | |||
| -- Serialization test cases (incremental type checking) | |||
There was a problem hiding this comment.
Where did you get all these tests? I hope you don't mind I'm not going to review all of them carefully, I trust you.
I wrote down a list of interesting mypy features and manually created tests for those that seemed relevant. Yeah, it's okay not to review them carefully. |
|
Is this still blocked on quick mode crashes? |
|
I've left out all test cases that cause quick mode crashes, so this can be merged. I'll merge this now since this only touches test cases. |
The test cases use a serialized module in incremental mode
in various ways to make sure that all important information
in the AST nodes is preserved during serialization and
deserialization.
These are all very straightforward. The idea is to help catch
regressions early and to make it easier to refactor or optimize
serialization code. Working on these helped find 2 issues -- I
separated the first to PR #3275. The second issue (#3274) is
still unfixed and there is a skipped test case for it.
More complex cases such as import cycles will still go to
check-incremental.test.