d721c95b8b
A recent update of flake8 in CI introduced a new check E741. It basically checks that variables are at least 3 characters long. Up to now, however, we have used shorter names in some places - all of them turn out to be "l" for a line of text. Replace all those "l" variables with "line". Fixes: https://gitlab.com/buildroot.org/buildroot/-/jobs/1687009829 partially: support/scripts/boot-qemu-image.py:47:21: E741 ambiguous variable name 'l' support/scripts/check-dotconfig.py:20:38: E741 ambiguous variable name 'l' support/scripts/size-stats:76:13: E741 ambiguous variable name 'l' support/testing/tests/core/test_bad_arch.py:17:32: E741 ambiguous variable name 'l' support/testing/tests/package/test_python_treq.py:10:30: E741 ambiguous variable name 'l' support/testing/tests/toolchain/test_external.py:30:42: E741 ambiguous variable name 'l' Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
22 lines
678 B
Python
22 lines
678 B
Python
from tests.package.test_python import TestPythonPackageBase
|
|
|
|
|
|
class TestPythonTreq(TestPythonPackageBase):
|
|
sample_scripts = ["tests/package/sample_python_treq.py"]
|
|
|
|
def run_sample_scripts(self):
|
|
cmd = self.interpreter + " sample_python_treq.py"
|
|
output, exit_code = self.emulator.run(cmd, timeout=20)
|
|
refuse_msgs = [1 for line in output if "Connection refused" in line]
|
|
self.assertGreater(sum(refuse_msgs), 0)
|
|
self.assertEqual(exit_code, 0)
|
|
|
|
|
|
class TestPythonPy3Treq(TestPythonTreq):
|
|
__test__ = True
|
|
config = TestPythonTreq.config + \
|
|
"""
|
|
BR2_PACKAGE_PYTHON3=y
|
|
BR2_PACKAGE_PYTHON_TREQ=y
|
|
"""
|