projects
/
nmigen.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
dbb9f1f
)
tests: make spec directory name unique per test method.
author
anuejn
<jarohabiger@googlemail.com>
Thu, 22 Oct 2020 21:38:44 +0000
(23:38 +0200)
committer
Luke Kenneth Casson Leighton
<lkcl@lkcl.net>
Fri, 31 Dec 2021 15:15:34 +0000
(15:15 +0000)
tests/utils.py
patch
|
blob
|
history
diff --git
a/tests/utils.py
b/tests/utils.py
index 9f2282f6ecc214c360cc8f6a74acc754914d4b5d..6a50df0399cee3525b819fdb422393650a87e278 100644
(file)
--- a/
tests/utils.py
+++ b/
tests/utils.py
@@
-28,7
+28,12
@@
class FHDLTestCase(unittest.TestCase):
self.assertEqual(prepare_repr(repr(obj)), prepare_repr(repr_str))
def assertFormal(self, spec, mode="bmc", depth=1):
- caller, *_ = traceback.extract_stack(limit=2)
+ stack = traceback.extract_stack()
+ for frame in reversed(stack):
+ if os.path.dirname(__file__) not in frame.filename:
+ break
+ caller = frame
+
spec_root, _ = os.path.splitext(caller.filename)
spec_dir = os.path.dirname(spec_root)
spec_name = "{}_{}".format(