Closed blackfist closed 9 years ago
Fixed that @krmaxwell
Ugh... you lost the merge race with @krmaxwell. Looks like conflict time!
I blame @krmaxwell.
@blackfist valid.
Also, out of curiosity, why does the call to os.getenv()
specify a default True instead of None? Does that break something?
Also, I fixed the merge conflict in our copy of your branch, no worries.
I originally had os.getenv("VT_API", False)==False
which I realized evaluates to True so I thought why not just get rid of the check for False and just put a true in there instead.
Further testing on my end seems to show that making the change results in the tests being skipped every time because when the environment variable is set then os.getenv
returns a value which is True in python. So here is another fix.
The problem right now is that it looks to me as though it will always skip the test.
unittest.skipIf(condition, reason) Skip the decorated test if condition is true.
os.getenv(varname[, value]) Return the value of the environment variable varname if it exists, or value if it doesn’t. value defaults to None.
Because of this with the default, os.getenv()
always returns either an actual value or True, and in that case the @unittest.skipIf()
will always trigger.
That's what I get for trying to be fancy
we already know
WARNING this PR will modify some of the tests so you'll want to check it extra carefully.
Some of the tests will fail if they are run on a system where the environment variables are not set. This change to the
tests.py
file will skip tests that depend onVT_API
orURLVOID_API
if those environment variables are not set.