test: use #nmigen: magic comment instead of monkey patch.

Also, fix missing and incorrect src_loc_at arguments where
appropriate so the testsuite passes without warnings.
This commit is contained in:
whitequark 2019-10-26 06:36:54 +00:00
parent 9786d0c0e3
commit 75d0fcd639
11 changed files with 35 additions and 24 deletions

View file

@ -1,6 +0,0 @@
from ..hdl.ir import Elaboratable
# The nMigen testsuite creates a lot of elaboratables that are intentionally unused.
# Disable the unused elaboratable check, as in our case it provides nothing but noise.
del Elaboratable.__del__

View file

@ -1,3 +1,5 @@
# nmigen: UnusedElaboratable=no
import unittest
from ...compat import *

View file

@ -1,3 +1,5 @@
# nmigen: UnusedElaboratable=no
from .. import *
from ..hdl.rec import *
from ..lib.io import *

View file

@ -1,3 +1,5 @@
# nmigen: UnusedElaboratable=no
from collections import OrderedDict
from enum import Enum

View file

@ -1,3 +1,5 @@
# nmigen: UnusedElaboratable=no
from collections import OrderedDict
from ..hdl.ast import *

View file

@ -1,3 +1,5 @@
# nmigen: UnusedElaboratable=no
from ..hdl.ast import *
from ..hdl.mem import *
from .utils import *

View file

@ -1,3 +1,5 @@
# nmigen: UnusedElaboratable=no
from ..hdl.ast import *
from ..hdl.cd import *
from ..hdl.ir import *

View file

@ -1,3 +1,5 @@
# nmigen: UnusedElaboratable=no
from .utils import *
from ..hdl import *
from ..back.pysim import *

View file

@ -1,3 +1,5 @@
# nmigen: UnusedElaboratable=no
from .utils import *
from ..hdl import *
from ..asserts import *