whitespace and use exc is None not exc == None
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Sat, 8 Jan 2022 15:41:32 +0000 (15:41 +0000)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Sat, 8 Jan 2022 15:41:32 +0000 (15:41 +0000)
src/soc/experiment/test/test_loadstore1.py

index 8cf2e1196f415a34cacaf32f40c5ed15eab0c601..eb31acf04d1ccd3fb98a5abec0cbfcecfa6da376 100644 (file)
@@ -516,16 +516,18 @@ def _test_loadstore1_microwatt_mmu_bin_test2(dut, mem):
 
     wbget.stop = True
 
+
 def test_pi_ld_misalign(pi,addr,data_len,msr):
     for i in range(0,data_len):
         ld_data, exctype, exc = yield from pi_ld(pi, addr+i, data_len, msr=msr)
         yield
         if i == 0:
-            assert exc==None
+            assert exc is None # use "is None" not "== None"
             print("MISALIGN: test_pi_ld_misalign returned",hex(ld_data))
         else:
             assert exc.alignment == 1
 
+
 def _test_loadstore1_misalign(dut, mem):
     mmu = dut.submodules.mmu
     pi = dut.submodules.ldst.pi