From: whitequark Date: Sat, 3 Aug 2019 13:44:44 +0000 (+0000) Subject: Improve test added in 29fee01f to not leak warnings. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f2c93a626e84ea5255a820a09aa2a9b619ccc58e;p=nmigen.git Improve test added in 29fee01f to not leak warnings. --- diff --git a/nmigen/test/test_hdl_ir.py b/nmigen/test/test_hdl_ir.py index 2ad5eb2..439b791 100644 --- a/nmigen/test/test_hdl_ir.py +++ b/nmigen/test/test_hdl_ir.py @@ -18,9 +18,11 @@ class FragmentGetTestCase(FHDLTestCase): msg="Object 'None' cannot be elaborated"): Fragment.get(None, platform=None) - with self.assertRaises(AttributeError, - msg="Object 'None' cannot be elaborated"): - Fragment.get(BadElaboratable(), platform=None) + with self.assertWarns(UserWarning, + msg=".elaborate() returned None; missing return statement?"): + with self.assertRaises(AttributeError, + msg="Object 'None' cannot be elaborated"): + Fragment.get(BadElaboratable(), platform=None) class FragmentGeneratedTestCase(FHDLTestCase):