summaryrefslogtreecommitdiff
path: root/tests/format/optionos.py
diff options
context:
space:
mode:
authorAngelos Evripiotis <jevripiotis@bloomberg.net>2019-03-27 11:31:05 +0000
committerAngelos Evripiotis <angelos.evripiotis@gmail.com>2019-04-11 13:58:33 +0000
commit0d4e40d96c773fdc769069fed4d5c654ba6d25f0 (patch)
tree14ee5d7a335cb9cd592cf098fec1de04ec7952ae /tests/format/optionos.py
parent9a9b06a5b52ced084b447c0468617e963555e068 (diff)
downloadbuildstream-0d4e40d96c773fdc769069fed4d5c654ba6d25f0.tar.gz
Use platform.uname instead of os.uname for win32
The 'platform' module in the standard library provides a more portable version of uname(), which also works on Windows. In CPython, the platform version is implemented in terms of the os version: https://github.com/python/cpython/blob/60875db2f67815d7d181c552bfac59e8c97619e3/Lib/platform.py#L747
Diffstat (limited to 'tests/format/optionos.py')
-rw-r--r--tests/format/optionos.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/format/optionos.py b/tests/format/optionos.py
index a4e2a6cf9..6856fd69c 100644
--- a/tests/format/optionos.py
+++ b/tests/format/optionos.py
@@ -9,7 +9,7 @@ from buildstream import _yaml
from buildstream._exceptions import ErrorDomain, LoadErrorReason
from buildstream.plugintestutils.runcli import cli # pylint: disable=unused-import
-from tests.testutils import override_os_uname
+from tests.testutils import override_platform_uname
DATA_DIR = os.path.dirname(os.path.realpath(__file__))
@@ -30,7 +30,7 @@ DATA_DIR = os.path.dirname(os.path.realpath(__file__))
('HaikuOS', 'SunOS', 'SunOSy'),
])
def test_conditionals(cli, datafiles, system, value, expected):
- with override_os_uname(system=system):
+ with override_platform_uname(system=system):
project = os.path.join(datafiles.dirname, datafiles.basename, 'option-os')
bst_args = []
@@ -53,7 +53,7 @@ def test_conditionals(cli, datafiles, system, value, expected):
@pytest.mark.datafiles(DATA_DIR)
def test_unsupported_arch(cli, datafiles):
- with override_os_uname(system="AIX"):
+ with override_platform_uname(system="AIX"):
project = os.path.join(datafiles.dirname, datafiles.basename, 'option-os')
result = cli.run(project=project, silent=True, args=[
'show',