Skip to content

Commit

Permalink
use win32_editionId() in (array)
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul Monson committed Nov 21, 2018
1 parent caf9afd commit f8be65d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Lib/platform.py
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,7 @@ def _syscmd_ver(system='', release='', version='',
}

def win32_is_iot(isIot=False):
if win32_editionId() == 'IoTUAP' or win32_editionId() == 'NanoServer' or win32_editionId() == 'WindowsCoreHeadless' or win32_editionId() == 'IoTEdgeOS':
if win32_editionId() in ('IoTUAP', 'NanoServer', 'WindowsCoreHeadless', 'IoTEdgeOS'):
return True
return False

Expand Down
2 changes: 1 addition & 1 deletion Lib/test/test_mimetypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def tearDown(self):
mimetypes.types_map.clear()
mimetypes.types_map.update(self.original_types_map)

@unittest.skipIf(win32_editionId() == 'NanoServer' or win32_editionId() == 'WindowsCoreHeadless' or win32_editionId() == 'IoTEdgeOS', "mime types registry keys not available on NanoServer")
@unittest.skipIf(win32_editionId() in ('NanoServer', 'WindowsCoreHeadless', 'IoTEdgeOS'), "mime types registry keys not available on NanoServer")
def test_registry_parsing(self):
# the original, minimum contents of the MIME database in the
# Windows registry is undocumented AFAIK.
Expand Down
2 changes: 1 addition & 1 deletion Lib/test/test_winreg.py
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ def test_named_arguments(self):
DeleteKeyEx(key=HKEY_CURRENT_USER, sub_key=test_key_name,
access=KEY_ALL_ACCESS, reserved=0)

@unittest.skipIf(win32_editionId() == 'WindowsCoreHeadless' or win32_editionId() == 'IoTEdgeOS', "APIs not available on WindowsCoreHeadless")
@unittest.skipIf(win32_editionId() in ('WindowsCoreHeadless', 'IoTEdgeOS'), "APIs not available on WindowsCoreHeadless")
def test_reflection_functions(self):
# Test that we can call the query, enable, and disable functions
# on a key which isn't on the reflection list with no consequences.
Expand Down

0 comments on commit f8be65d

Please sign in to comment.