Skip to content

Commit

Permalink
Add test for get_bind_modules
Browse files Browse the repository at this point in the history
Signed-off-by: Jean-Christophe Morin <jean_christophe_morin@hotmail.com>
  • Loading branch information
JeanChristopheMorinPerso committed Jan 27, 2024
1 parent 0fd6818 commit 88bcf9d
Showing 1 changed file with 25 additions and 3 deletions.
28 changes: 25 additions & 3 deletions src/rez/tests/test_bind.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit 88bcf9d

Please sign in to comment.