test suite reviews and discussions
 help / color / mirror / Atom feed
From: ohilyard@iol.unh.edu
To: dts@dpdk.org
Cc: lijuan.tu@intel.com, Owen Hilyard <ohilyard@iol.unh.edu>
Subject: [dts] [PATCH 1/3] framework/test_result: Fix circular import
Date: Mon,  9 Aug 2021 07:24:02 -0400	[thread overview]
Message-ID: <20210809112404.7199-1-ohilyard@iol.unh.edu> (raw)

From: Owen Hilyard <ohilyard@iol.unh.edu>

This circular import is normally fine because the debugger module is
initialized before test_case is imported, but since that is not
necessarily the case with the dependency script, the circular import
needed to be removed.

Signed-off-by: Owen Hilyard <ohilyard@iol.unh.edu>
 framework/test_case.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/framework/test_case.py b/framework/test_case.py
index 98b716b9..3d7bc30e 100644
--- a/framework/test_case.py
+++ b/framework/test_case.py
@@ -33,7 +33,6 @@
 A base class for creating DTF test cases.
 import re
-import debugger
 import traceback
 import signal
 import time
@@ -374,6 +373,10 @@ class TestCase(object):
         Execute all test cases in one suite.
+        # local import to avoid circular import
+        import debugger
         # prepare debugger rerun case environment
         if self._enable_debug or self._debug_case:
             debugger.AliveSuite = self

             reply	other threads:[~2021-08-09 11:24 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-09 11:24 ohilyard [this message]
2021-08-09 11:24 ` [dts] [PATCH 2/3] requirements: Added required modules to requirements ohilyard
2021-08-09 11:24 ` [dts] [PATCH 3/3] ci/initial: Added script to get the tests for a patchset ohilyard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210809112404.7199-1-ohilyard@iol.unh.edu \
    --to=ohilyard@iol.unh.edu \
    --cc=dts@dpdk.org \
    --cc=lijuan.tu@intel.com \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).