Fix blinking test testImportsFromTypingUnusedInTypeComments idea/146.1513
authorMikhail Golubev <mikhail.golubev@jetbrains.com>
Mon, 25 Apr 2016 14:19:54 +0000 (16:19 +0200)
committerMikhail Golubev <mikhail.golubev@jetbrains.com>
Tue, 26 Apr 2016 14:53:03 +0000 (16:53 +0200)
commit99f755531b36f9d760c60cf77481550e9bcd2c75
tree1352829e553f5b43d7821e2b3422dfc91fcaea1c
parent73b7dd1070e0d87341efb4b377efc947767f1bff
Fix blinking test testImportsFromTypingUnusedInTypeComments

Due to non-deterministic order of test execution (in particular if
CythonParsingTest has been executed before PyOptimizeImportsTest)
sometimes PyDocstringTokenSetContributor was registered via EP,
but wan't taken into account in the cached static instance of
PythonDialectTokenSetProvider.
Since reference expressions inside injected fragments have element
type DOC_REFERENCE and the latter wasn't part of expression token set,
that assertion in PySubscriptionExpression#getOperand failed.
python/testSrc/com/jetbrains/python/PyOptimizeImportsTest.java