@@ -1308,17 +1308,18 @@ def test_bit_slice_inputs(self):
13081308 # only has one user and just passes through ``c``, because that user is a
13091309 # bit-slice.
13101310 self .assertTrue ("assign tmp3 = c" in buffer .getvalue ())
1311+
13111312 def test_custom_module_name (self ):
1312- a , b = pyrtl .Input (1 , 'a' ), pyrtl .Input (1 , 'b' )
1313- out = pyrtl .Output (name = ' out' )
1313+ a , b = pyrtl .Input (1 , "a" ), pyrtl .Input (1 , "b" )
1314+ out = pyrtl .Output (name = " out" )
13141315 out <<= a & b
13151316
13161317 buf = io .StringIO ()
1317- pyrtl .output_to_verilog (buf , module_name = ' custom_top' )
1318+ pyrtl .output_to_verilog (buf , module_name = " custom_top" )
13181319 text = buf .getvalue ()
13191320
1320- self .assertIn (' module custom_top' , text )
1321- self .assertNotIn (' module toplevel' , text )
1321+ self .assertIn (" module custom_top" , text )
1322+ self .assertNotIn (" module toplevel" , text )
13221323
13231324
13241325verilog_input_counter = """\
@@ -1664,6 +1665,7 @@ def test_only_initialize_memblocks(self):
16641665 pyrtl .output_verilog_testbench (buffer , add_reset = False )
16651666 # The testbench should not touch the RomBlock.
16661667 self .assertTrue ("my_rom" not in buffer .getvalue ())
1668+
16671669 def test_custom_module_name_testbench (self ):
16681670 # Minimal design
16691671 a , b = pyrtl .Input (1 , "a" ), pyrtl .Input (1 , "b" )
@@ -1680,7 +1682,6 @@ def test_custom_module_name_testbench(self):
16801682 self .assertNotIn ("toplevel block(" , text )
16811683
16821684
1683-
16841685firrtl_output_concat_test = """\
16851686 circuit Example :
16861687 module Example :
@@ -2295,6 +2296,5 @@ def test_bench_with_same_io_name(self):
22952296 self .check_io (pyrtl .Output , ["tmp3" , "G4" ])
22962297
22972298
2298-
22992299if __name__ == "__main__" :
23002300 unittest .main ()
0 commit comments