diff mbox series

[1/5] bitbake: tests/fetch: Mark TestTimeout as not a test suite

Message ID 20230616123651.915234-2-peter.hoyes@arm.com
State Accepted, archived
Commit b5455b98093a3eaf122ebe3d29c3bef949fd2440
Headers show
Series RFC: Support pytest for bitbake self-tests | expand

Commit Message

Peter Hoyes June 16, 2023, 12:36 p.m. UTC
From: Peter Hoyes <Peter.Hoyes@arm.com>

pytest test collection attempts to collect all classes containing
"Test". TestTimeout is not a test class so add the __test__ = False
attribute to indicate this.

Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com>
---
 bitbake/lib/bb/tests/fetch.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/bitbake/lib/bb/tests/fetch.py b/bitbake/lib/bb/tests/fetch.py
index d230120271..ba7be048a8 100644
--- a/bitbake/lib/bb/tests/fetch.py
+++ b/bitbake/lib/bb/tests/fetch.py
@@ -24,7 +24,8 @@  def skipIfNoNetwork():
     return lambda f: f
 
 class TestTimeout(Exception):
-    pass
+    # Indicate to pytest that this is not a test suite
+    __test__ = False
 
 class Timeout():