back.pysim: warn if simulation is not run.

This would have prevented 3ea35b85.
This commit is contained in:
whitequark 2018-12-29 15:02:04 +00:00
parent 92a96e1644
commit 849c649259
2 changed files with 16 additions and 0 deletions

View file

@ -530,3 +530,9 @@ class SimulatorIntegrationTestCase(FHDLTestCase):
self.assertEqual((yield self.rdport.data), 0x33)
sim.add_clock(1e-6)
sim.add_process(process)
def test_wrong_not_run(self):
with self.assertWarns(UserWarning,
msg="Simulation created, but not run"):
with Simulator(Fragment()) as sim:
pass