Acceptance tests: drop usage of ":avocado: enable"
PATCH 1/1 Acceptance tests: drop usage of ":avocado: enable"
The Avocado test runner attemps to find its INSTRUMENTED (that is, Python based tests) in a manner that is as safe as possible to the user. Different from plain Python unittest, it won't load or execute test code on an operation such as:
$ avocado list tests/acceptance/
Before version 68.0, the logic implemented to identify INSTRUMENTED tests would require either the ":avocado: enable" or ":avocado:
recursive" statement as a flag for tests that would not inherit directly from "avocado.Test". This is not necessary anymore, and because of that the boiler plate statements can now be removed.
Reference: https://avocado-framework.readthedocs.io/en/68.0/release_notes/68_0.html#users-test-writers
--- docs/devel/testing.rst | 1 - tests/acceptance/boot_linux_console.py | 1 - tests/acceptance/linux_initrd.py | 1 - tests/acceptance/version.py | 1 - tests/acceptance/virtio_version.py | 1 - tests/acceptance/vnc.py | 1 - tests/requirements.txt | 2 +- 7 files changed, 1 insertion(+), 7 deletions(-)
docs/devel/testing.rst +0 -1
@@ -600,7 +600,6 @@ the ``avocado_qemu.Test`` class. Here's a simple usage example: class Version(Test): """ - :avocado: enable :avocado: tags=quick """ def test_qmp_human_info_version(self):
tests/acceptance/boot_linux_console.py +0 -1
@@ -18,7 +18,6 @@ class BootLinuxConsole(Test): Boots a x86_64 Linux kernel and checks that the console is operational and the kernel command line is properly passed from QEMU to the kernel - :avocado: enable :avocado: tags=x86_64 """
tests/acceptance/linux_initrd.py +0 -1
@@ -18,7 +18,6 @@ class LinuxInitrd(Test): """ Checks QEMU evaluates correctly the initrd file passed as -initrd option. - :avocado: enable :avocado: tags=x86_64 """
tests/acceptance/version.py +0 -1
@@ -14,7 +14,6 @@ from avocado_qemu import Test class Version(Test): """ - :avocado: enable :avocado: tags=quick """ def test_qmp_human_info_version(self):
tests/acceptance/virtio_version.py +0 -1
@@ -61,7 +61,6 @@ class VirtioVersionCheck(Test): same device tree created by `disable-modern` and `disable-legacy`. - :avocado: enable :avocado: tags=x86_64 """
tests/acceptance/vnc.py +0 -1
@@ -13,7 +13,6 @@ from avocado_qemu import Test class Vnc(Test): """ - :avocado: enable :avocado: tags=vnc,quick """ def test_no_vnc(self):
tests/requirements.txt +1 -1
@@ -1,4 +1,4 @@ # Add Python module requirements, one per line, to be installed # in the tests/venv Python virtual environment. For more info, # refer to: https://pip.pypa.io/en/stable/user_guide/#id1 -avocado-framework==65.0 +avocado-framework==68.0
Signature · 1 line
2.20.1
Hi, Cleber.
Quoted 7 lines · Cleber Rosa
The Avocado test runner attemps to find its INSTRUMENTED (that is, Python based tests) in a manner that is as safe as possible to the user. Different from plain Python unittest, it won't load or execute test code on an operation such as:
$ avocado list tests/acceptance/
Quoted 8 lines
Before version 68.0, the logic implemented to identify INSTRUMENTED tests would require either the ":avocado: enable" or ":avocado:
recursive" statement as a flag for tests that would not inherit directly from "avocado.Test". This is not necessary anymore, and because of that the boiler plate statements can now be removed.Reference: https://avocado-framework.readthedocs.io/en/68.0/release_notes/68_0.html#users-test-writers
Signed-off-by Cleber Rosa <[email protected]>
Quoted 10 lines
--- docs/devel/testing.rst | 1 - tests/acceptance/boot_linux_console.py | 1 - tests/acceptance/linux_initrd.py | 1 - tests/acceptance/version.py | 1 - tests/acceptance/virtio_version.py | 1 - tests/acceptance/vnc.py | 1 - tests/requirements.txt | 2 +- 7 files changed, 1 insertion(+), 7 deletions(-)
{...}
Quoted 2 lines
2.20.1
Thanks,
Signature · 3 lines
Caio Carrara Software Engineer, Virt Team - Red Hat [email protected]
Quoted 5 lines · Cleber Rosa
The Avocado test runner attemps to find its INSTRUMENTED (that is, Python based tests) in a manner that is as safe as possible to the user. Different from plain Python unittest, it won't load or execute test code on an operation such as:
Quoted 7 lines
$ avocado list tests/acceptance/Before version 68.0, the logic implemented to identify INSTRUMENTED tests would require either the ":avocado: enable" or ":avocado:
recursive" statement as a flag for tests that would not inherit directly from "avocado.Test". This is not necessary anymore, and because of that the boiler plate statements can now be removed.
Yay \o/
Quoted 3 lines
Reference: https://avocado-framework.readthedocs.io/en/68.0/release_notes/68_0.html#users-test-writers
Signed-off-by Cleber Rosa <[email protected]>
Quoted 93 lines
--- docs/devel/testing.rst | 1 - tests/acceptance/boot_linux_console.py | 1 - tests/acceptance/linux_initrd.py | 1 - tests/acceptance/version.py | 1 - tests/acceptance/virtio_version.py | 1 - tests/acceptance/vnc.py | 1 - tests/requirements.txt | 2 +- 7 files changed, 1 insertion(+), 7 deletions(-)docs/devel/testing.rst +0
-1@@ -600,7 +600,6 @@ the ``avocado_qemu.Test`` class. Here's a simple usage example: class Version(Test): """ - :avocado: enable :avocado: tags=quick """ def test_qmp_human_info_version(self):tests/acceptance/boot_linux_console.py +0
-1@@ -18,7 +18,6 @@ class BootLinuxConsole(Test): Boots a x86_64 Linux kernel and checks that the console is operational and the kernel command line is properly passed from QEMU to the kernel - :avocado: enable :avocado: tags=x86_64 """tests/acceptance/linux_initrd.py +0
-1@@ -18,7 +18,6 @@ class LinuxInitrd(Test): """ Checks QEMU evaluates correctly the initrd file passed as -initrd option. - :avocado: enable :avocado: tags=x86_64 """tests/acceptance/version.py +0
-1@@ -14,7 +14,6 @@ from avocado_qemu import Test class Version(Test): """ - :avocado: enable :avocado: tags=quick """ def test_qmp_human_info_version(self):tests/acceptance/virtio_version.py +0
-1@@ -61,7 +61,6 @@ class VirtioVersionCheck(Test): same device tree created by `disable-modern` and `disable-legacy`. - :avocado: enable :avocado: tags=x86_64 """tests/acceptance/vnc.py +0
-1@@ -13,7 +13,6 @@ from avocado_qemu import Test class Vnc(Test): """ - :avocado: enable :avocado: tags=vnc,quick """ def test_no_vnc(self):tests/requirements.txt +1
-1@@ -1,4 +1,4 @@ # Add Python module requirements, one per line, to be installed # in the tests/venv Python virtual environment. For more info, # refer to: https://pip.pypa.io/en/stable/user_guide/#id1 -avocado-framework==65.0 +avocado-framework==68.0
Quoted 15 lines · Cleber Rosa
The Avocado test runner attemps to find its INSTRUMENTED (that is, Python based tests) in a manner that is as safe as possible to the user. Different from plain Python unittest, it won't load or execute test code on an operation such as:
$ avocado list tests/acceptance/Before version 68.0, the logic implemented to identify INSTRUMENTED tests would require either the ":avocado: enable" or ":avocado:
recursive" statement as a flag for tests that would not inherit directly from "avocado.Test". This is not necessary anymore, and because of that the boiler plate statements can now be removed.Reference: https://avocado-framework.readthedocs.io/en/68.0/release_notes/68_0.html#users-test-writers
Signed-off-by Cleber Rosa <[email protected]>
Quoted 9 lines
--- docs/devel/testing.rst | 1 - tests/acceptance/boot_linux_console.py | 1 - tests/acceptance/linux_initrd.py | 1 - tests/acceptance/version.py | 1 - tests/acceptance/virtio_version.py | 1 - tests/acceptance/vnc.py | 1 - tests/requirements.txt | 2 +- 7 files changed, 1 insertion(+), 7 deletions(-)
Quoted 83 lines
docs/devel/testing.rst +0
-1@@ -600,7 +600,6 @@ the ``avocado_qemu.Test`` class. Here's a simple usage example: class Version(Test): """ - :avocado: enable :avocado: tags=quick """ def test_qmp_human_info_version(self):tests/acceptance/boot_linux_console.py +0
-1@@ -18,7 +18,6 @@ class BootLinuxConsole(Test): Boots a x86_64 Linux kernel and checks that the console is operational and the kernel command line is properly passed from QEMU to the kernel - :avocado: enable :avocado: tags=x86_64 """tests/acceptance/linux_initrd.py +0
-1@@ -18,7 +18,6 @@ class LinuxInitrd(Test): """ Checks QEMU evaluates correctly the initrd file passed as -initrd option. - :avocado: enable :avocado: tags=x86_64 """tests/acceptance/version.py +0
-1@@ -14,7 +14,6 @@ from avocado_qemu import Test class Version(Test): """ - :avocado: enable :avocado: tags=quick """ def test_qmp_human_info_version(self):tests/acceptance/virtio_version.py +0
-1@@ -61,7 +61,6 @@ class VirtioVersionCheck(Test): same device tree created by `disable-modern` and `disable-legacy`. - :avocado: enable :avocado: tags=x86_64 """tests/acceptance/vnc.py +0
-1@@ -13,7 +13,6 @@ from avocado_qemu import Test class Vnc(Test): """ - :avocado: enable :avocado: tags=vnc,quick """ def test_no_vnc(self):tests/requirements.txt +1
-1@@ -1,4 +1,4 @@ # Add Python module requirements, one per line, to be installed # in the tests/venv Python virtual environment. For more info, # refer to: https://pip.pypa.io/en/stable/user_guide/#id1 -avocado-framework==65.0 +avocado-framework==68.0