From 3a2b6ba5cf1ad46e3684ee0c4175b3ea8d7c1280 Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Sat, 9 Dec 2023 14:52:46 -0500 Subject: test/py: Disable error E0611 in two cases for pylint Recently pylint has started to complain about: No name 'fs_helper' in module 'tests' (no-name-in-module) Due to: from tests import fs_helper However, we have: test/py/tests/fs_helper.py And since we do not want to add a dummy test/py/tests/__init__.py to silence this warning we instead just disable it as needed. Cc: Simon Glass Signed-off-by: Tom Rini --- test/py/tests/test_ut.py | 1 + 1 file changed, 1 insertion(+) (limited to 'test/py/tests/test_ut.py') diff --git a/test/py/tests/test_ut.py b/test/py/tests/test_ut.py index 1d9149a3f68..0e3a48e73f6 100644 --- a/test/py/tests/test_ut.py +++ b/test/py/tests/test_ut.py @@ -9,6 +9,7 @@ import os.path import pytest import u_boot_utils +# pylint: disable=E0611 from tests import fs_helper def mkdir_cond(dirname): -- cgit v1.2.3 From 261d29e2f3f8cd4fdf79088ca17bf8f90c902337 Mon Sep 17 00:00:00 2001 From: Francis Laniel Date: Fri, 22 Dec 2023 22:02:24 +0100 Subject: test: hush: Test hush variable expansion Verifies shell variables are replaced by their values. Reviewed-by: Simon Glass Signed-off-by: Francis Laniel --- test/py/tests/test_ut.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'test/py/tests/test_ut.py') diff --git a/test/py/tests/test_ut.py b/test/py/tests/test_ut.py index 0e3a48e73f6..c169c835e38 100644 --- a/test/py/tests/test_ut.py +++ b/test/py/tests/test_ut.py @@ -500,5 +500,11 @@ def test_ut(u_boot_console, ut_subtest): execute command 'ut foo bar' """ - output = u_boot_console.run_command('ut ' + ut_subtest) + if ut_subtest == 'hush hush_test_simple_dollar': + # ut hush hush_test_simple_dollar prints "Unknown command" on purpose. + with u_boot_console.disable_check('unknown_command'): + output = u_boot_console.run_command('ut ' + ut_subtest) + assert('Unknown command \'quux\' - try \'help\'' in output) + else: + output = u_boot_console.run_command('ut ' + ut_subtest) assert output.endswith('Failures: 0') -- cgit v1.2.3