From e54fa6f5f4b7f087a10438bbc9402d0c2018d170 Mon Sep 17 00:00:00 2001 From: Robert Jordens Date: Sat, 30 Nov 2013 06:51:24 -0700 Subject: [PATCH] migen/test: if SimCase is a TestCase, it's run in every module that imports it --- migen/test/support.py | 2 +- migen/test/test_coding.py | 6 +++--- migen/test/test_fifo.py | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/migen/test/support.py b/migen/test/support.py index 913462acd..e99cfb2c4 100644 --- a/migen/test/support.py +++ b/migen/test/support.py @@ -9,7 +9,7 @@ class SimBench(Module): if self.callback is not None: return self.callback(self, s) -class SimCase(unittest.TestCase): +class SimCase: TestBench = SimBench def setUp(self, *args, **kwargs): diff --git a/migen/test/test_coding.py b/migen/test/test_coding.py index de0980500..2d0f53d9d 100644 --- a/migen/test/test_coding.py +++ b/migen/test/test_coding.py @@ -5,7 +5,7 @@ from migen.genlib.coding import * from migen.test.support import SimCase, SimBench -class EncCase(SimCase): +class EncCase(SimCase, unittest.TestCase): class TestBench(SimBench): def __init__(self): self.submodules.dut = Encoder(8) @@ -29,7 +29,7 @@ class EncCase(SimCase): self.assertEqual(i, 1<