From bd691b847c2cb6cbea3450a8749bcc1a67c295e7 Mon Sep 17 00:00:00 2001 From: Dylan Baker Date: Tue, 31 Aug 2021 11:07:46 -0700 Subject: interpreter: use python dunders instead of lock for unpicklability This simplifies things for us, as we don't have to have threading imported for no other reason, and we can remove the `an_unpicklable_object` from the Interpreter and mesonlib, since there was only one user of this. --- unittests/internaltests.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'unittests/internaltests.py') diff --git a/unittests/internaltests.py b/unittests/internaltests.py index 0f2af18..8cebeb8 100644 --- a/unittests/internaltests.py +++ b/unittests/internaltests.py @@ -1524,6 +1524,6 @@ class InternalTests(unittest.TestCase): build.environment = mock.Mock() build.environment.get_source_dir = mock.Mock(return_value='') with mock.patch('mesonbuild.interpreter.Interpreter._redetect_machines', mock.Mock()), \ - self.assertRaises(Exception): + self.assertRaises(mesonbuild.mesonlib.MesonBugException): i = mesonbuild.interpreter.Interpreter(build, mock=True) pickle.dumps(i) -- cgit v1.1