mirror of
https://github.com/github/codeql.git
synced 2025-12-18 09:43:15 +01:00
We can't understand the real `six.py` file, so we have some internal plumbing that enables us to handle six anyway. While updating that, I had a hell of a lot of trouble with these tests. What we actually want, is to see that we can understand what the values imported from six are (i.e., their points-to information). I added a few more, that I think would be useful. If we can figure out all of these, I don't actually care if we're doing it by understanding the real `six.py` file, or by some internal trick. I verified that we don't get results with the real `six.py` file by disabling our internal tricks, and putting a copy of six.py just next to test.py. We used to have an other file that would list all the properties we knew and their value, but that turned out to be a fragile and annoying test, since the results differed from which version of python you ran it with (3.5 vs 3.8) and which machine you ran it on (my machien vs jenkins). I don't care about the results in this file, and I can certainly not eyeball it to see if it's correct or not.
10 lines
258 B
Python
10 lines
258 B
Python
import six
|
|
|
|
# Check that some expected attributes are visible -- this is the reason we added stubs in
|
|
# the first place! If this works, we're happy!
|
|
six.moves
|
|
six.moves.range
|
|
six.moves.zip
|
|
six.moves.http_client.HTTPConnection
|
|
six.moves.urllib.parse.urlsplit
|