From 88bcf9d888c4e0f96e3510448852d980c19b9ab9 Mon Sep 17 00:00:00 2001 From: Jean-Christophe Morin Date: Sat, 27 Jan 2024 11:26:10 -0500 Subject: [PATCH] Add test for get_bind_modules Signed-off-by: Jean-Christophe Morin --- src/rez/tests/test_bind.py | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/src/rez/tests/test_bind.py b/src/rez/tests/test_bind.py index b85621443..b457412da 100644 --- a/src/rez/tests/test_bind.py +++ b/src/rez/tests/test_bind.py @@ -12,11 +12,33 @@ class TestPackageBind(TestBase): + def test_get_bind_modules(self): + """Test get_bind_modules returns the expected modules""" + self.assertEqual( + sorted(package_bind.get_bind_modules().keys()), + [ + "PyQt", + "PySide", + "arch", + "cmake", + "gcc", + "hello_world", + "os", + "pip", + "platform", + "python", + "rez", + "rezgui", + "setuptools", + "sip", + ] + ) + def test_os_module_override(self): """Test that bind_module_path can override built-in bind modules""" - self.update_settings(dict( - bind_module_path=[self.data_path("bind")] - )) + self.update_settings({ + "bind_module_path": [self.data_path("bind")] + }) os_module_path = os.path.join(self.data_path("bind"), "os.py") os_bind_module = package_bind.find_bind_module("os")