Created
April 22, 2020 13:31
-
-
Save Bas-Man/bd3425dd09585398da7e7970f62b67e7 to your computer and use it in GitHub Desktop.
One method of mocking the values for sys.version_info.major/minor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def test_python2TooLow(): | |
with mock.patch.object(sys, 'version_info') as v_info: | |
v_info.major = 2 | |
v_info.minor = 7 | |
assert helper.system.meetsMinSpecs(3, 0) == False |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment