forked from AcademySoftwareFoundation/rez
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Issue AcademySoftwareFoundation#1557 - Add support for overriding bui…
…lt-in bind modules. Signed-off-by: Michael Nowakowski <m_nowakowski@apple.com>
- Loading branch information
1 parent
7e8617d
commit 980eab9
Showing
4 changed files
with
30 additions
and
4 deletions.
There are no files selected for viewing
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
""" | ||
Custom bind module override | ||
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
""" | ||
test package_bind module | ||
""" | ||
import os | ||
import unittest | ||
from rez import package_bind | ||
from rez.tests.util import TestBase | ||
|
||
|
||
class TestPackageBind(TestBase): | ||
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")] | ||
)) | ||
|
||
os_module_path = os.path.join(self.data_path("bind"), "os.py") | ||
os_bind_module = package_bind.find_bind_module("os") | ||
self.assertEqual(os_bind_module, os_module_path) | ||
|
||
|
||
if __name__ == '__main__': | ||
unittest.main() |