diff options
| author | Tom Rini <[email protected]> | 2022-01-25 08:01:43 -0500 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2022-01-25 08:01:43 -0500 |
| commit | 6146cd62aedc4849fec66f10ab0aa57f1dc64b8e (patch) | |
| tree | 7b4ea9a0c4251507b988a0f4d1584c3cb8952394 /test | |
| parent | 21a1439d986a889cefbc2ed785c3f592fc9266de (diff) | |
| parent | 54c5c2b8fee2f64d135349bc9764d068b647e4e0 (diff) | |
Merge branch '2022-01-24-assorted-updates'
- A number of cleanups to Python code based on running pylint
- Integrate changes so that we can run "make pylint" and compare the
results to a current baseline. Keep this as a manual check for now.
- Improve functionality of moveconfig.py
- pci: iproc: Set all 24 bits of PCI class code
Diffstat (limited to 'test')
| -rw-r--r-- | test/py/tests/test_env.py | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/test/py/tests/test_env.py b/test/py/tests/test_env.py index f85cb031382..b2f3470de94 100644 --- a/test/py/tests/test_env.py +++ b/test/py/tests/test_env.py @@ -2,11 +2,13 @@ # Copyright (c) 2015 Stephen Warren # Copyright (c) 2015-2016, NVIDIA CORPORATION. All rights reserved. -# Test operation of shell commands relating to environment variables. +""" +Test operation of shell commands relating to environment variables. +""" import os import os.path -from subprocess import call, check_call, CalledProcessError +from subprocess import call, CalledProcessError import tempfile import pytest @@ -192,7 +194,7 @@ def test_env_printenv_non_existent(state_test_env): c = state_test_env.u_boot_console with c.disable_check('error_notification'): response = c.run_command('printenv %s' % var) - assert(response == '## Error: "%s" not defined' % var) + assert response == '## Error: "%s" not defined' % var @pytest.mark.buildconfigspec('cmd_echo') def test_env_unset_non_existent(state_test_env): @@ -257,7 +259,7 @@ def test_env_import_checksum_no_size(state_test_env): with c.disable_check('error_notification'): response = c.run_command('env import -c %s -' % addr) - assert(response == '## Error: external checksum format must pass size') + assert response == '## Error: external checksum format must pass size' @pytest.mark.buildconfigspec('cmd_importenv') def test_env_import_whitelist_checksum_no_size(state_test_env): @@ -270,7 +272,7 @@ def test_env_import_whitelist_checksum_no_size(state_test_env): with c.disable_check('error_notification'): response = c.run_command('env import -c %s - foo1 foo2 foo4' % addr) - assert(response == '## Error: external checksum format must pass size') + assert response == '## Error: external checksum format must pass size' @pytest.mark.buildconfigspec('cmd_exportenv') @pytest.mark.buildconfigspec('cmd_importenv') @@ -359,12 +361,14 @@ def test_env_info(state_test_env): assert '= true' in l or '= false' in l nb_line += 1 else: - assert true + assert True assert nb_line == 3 response = c.run_command('env info -p -d') - assert 'Default environment is used' in response or "Environment was loaded from persistent storage" in response - assert 'Environment can be persisted' in response or "Environment cannot be persisted" in response + assert 'Default environment is used' in response or \ + "Environment was loaded from persistent storage" in response + assert 'Environment can be persisted' in response or \ + "Environment cannot be persisted" in response response = c.run_command('env info -p -d -q') assert response == "" |
