pylint-bot / test

0 stars 0 forks source link

[2.0 bugs] Enum mock ASTs #260

Closed pylint-bot closed 8 years ago

pylint-bot commented 8 years ago

Originally reported by: BitBucket: ceridwenv, GitHub: @ceridwen?


Previously, the code for building mock ASTs for enums was directly inserting Instance objects into the locals dictionary for enums. I changed this to wrap them in InterpreterObjects, but this is now breaking the tests. I'm not quite sure what the best way to handle this situation is.


pylint-bot commented 8 years ago

Original comment by Claudiu Popa (BitBucket: PCManticore, GitHub: @PCManticore?):


Taking a look at the test test_int_enum for instance, it seems that it doesn't use inference after obtaining the attribute with .getattr. In that case, just change it to use either igetattr or to infer what's retrieving, this should fix the problem. Wrapping these in InterpreterObjects makes sense.

pylint-bot commented 8 years ago

Original comment by BitBucket: ceridwenv, GitHub: @ceridwen?:


Enum tests changed to use inference properly in 054966c1572d