diff options
| author | Ricardo Martincoski <ricardo.martincoski@gmail.com> | 2017-10-05 18:42:09 -0300 |
|---|---|---|
| committer | Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> | 2017-10-06 18:56:49 +0200 |
| commit | ef8d1f1b15858ed0b86fb92e03d1c3797c6c1e1f (patch) | |
| tree | f1187ecd2a501454fc53e9ae03b89e4480f1d40e /support/testing/tests/package | |
| parent | 2927f412be6fd52961a2cd9aaed203d57609eef9 (diff) | |
| download | buildroot-ef8d1f1b15858ed0b86fb92e03d1c3797c6c1e1f.tar.gz buildroot-ef8d1f1b15858ed0b86fb92e03d1c3797c6c1e1f.zip | |
support/testing: fix code style
Fix the trivial warnings from flake8:
- remove modules imported but unused;
- use 2 lines before class or module level method;
- remove blank line at end of file.
Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>
Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Diffstat (limited to 'support/testing/tests/package')
| -rw-r--r-- | support/testing/tests/package/test_dropbear.py | 1 | ||||
| -rw-r--r-- | support/testing/tests/package/test_ipython.py | 8 | ||||
| -rw-r--r-- | support/testing/tests/package/test_python.py | 5 |
3 files changed, 9 insertions, 5 deletions
diff --git a/support/testing/tests/package/test_dropbear.py b/support/testing/tests/package/test_dropbear.py index da569d9b1b..8f7f1fee82 100644 --- a/support/testing/tests/package/test_dropbear.py +++ b/support/testing/tests/package/test_dropbear.py @@ -2,6 +2,7 @@ import os import infra.basetest + class TestDropbear(infra.basetest.BRTest): config = infra.basetest.BASIC_TOOLCHAIN_CONFIG + \ """ diff --git a/support/testing/tests/package/test_ipython.py b/support/testing/tests/package/test_ipython.py index a943101372..3b291d9583 100644 --- a/support/testing/tests/package/test_ipython.py +++ b/support/testing/tests/package/test_ipython.py @@ -1,5 +1,3 @@ -import os - from tests.package.test_python import TestPythonBase # # The following pythong tests are not being used here: @@ -8,7 +6,8 @@ from tests.package.test_python import TestPythonBase # # - zlib_test: IPython does not return a non-zero code the way CPython # does, so this test ends up being a false-negative -# + + class TestIPythonPy2(TestPythonBase): config = TestPythonBase.config + \ """ @@ -22,6 +21,7 @@ class TestIPythonPy2(TestPythonBase): self.math_floor_test(40) self.libc_time_test(40) + class TestIPythonPy3(TestPythonBase): config = TestPythonBase.config + \ """ @@ -34,5 +34,3 @@ class TestIPythonPy3(TestPythonBase): self.login() self.math_floor_test(40) self.libc_time_test(40) - - diff --git a/support/testing/tests/package/test_python.py b/support/testing/tests/package/test_python.py index 79773fff63..26cf49947b 100644 --- a/support/testing/tests/package/test_python.py +++ b/support/testing/tests/package/test_python.py @@ -2,6 +2,7 @@ import os import infra.basetest + class TestPythonBase(infra.basetest.BRTest): config = infra.basetest.BASIC_TOOLCHAIN_CONFIG + \ """ @@ -40,11 +41,13 @@ class TestPythonBase(infra.basetest.BRTest): _, exit_code = self.emulator.run(cmd, timeout) self.assertEqual(exit_code, 1) + class TestPython2(TestPythonBase): config = TestPythonBase.config + \ """ BR2_PACKAGE_PYTHON=y """ + def test_run(self): self.login() self.version_test("Python 2") @@ -52,11 +55,13 @@ class TestPython2(TestPythonBase): self.libc_time_test() self.zlib_test() + class TestPython3(TestPythonBase): config = TestPythonBase.config + \ """ BR2_PACKAGE_PYTHON3=y """ + def test_run(self): self.login() self.version_test("Python 3") |

