-
Notifications
You must be signed in to change notification settings - Fork 337
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix TypeError when running get_rpaths on rez.utils.elf module
Signed-off-by: Ruzette Krukkert <ruzettekrukkert@fusefx.com>
- Loading branch information
Ruzette Krukkert
authored and
Ruzette Krukkert
committed
Jul 18, 2024
1 parent
9c27f5e
commit 351bb0e
Showing
2 changed files
with
38 additions
and
1 deletion.
There are no files selected for viewing
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,35 @@ | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# Copyright Contributors to the Rez Project | ||
|
||
|
||
""" | ||
unit tests for 'rez.utils.elf' module | ||
""" | ||
from rez.tests.util import TestBase | ||
from rez.utils.elf import get_rpaths, patch_rpaths | ||
|
||
|
||
class TestElfUtils(TestBase): | ||
|
||
def __init__(self, *nargs, **kwargs): | ||
super().__init__(*nargs, **kwargs) | ||
|
||
@classmethod | ||
def setUpClass(cls): | ||
super().setUpClass() | ||
|
||
@classmethod | ||
def tearDownClass(cls): | ||
super().tearDownClass() | ||
|
||
def test_get_rpaths_raises_runtime_exception(self): | ||
"""Tests that no TypeError from elf functions are raised.""" | ||
self.assertRaises( | ||
RuntimeError, | ||
get_rpaths("/path/to/elfpath") | ||
) | ||
|
||
self.assertRaises( | ||
RuntimeError, | ||
patch_rpaths("/path/to/elfpath", ["$ORIGIN", "$ORIGINTEST"]) | ||
) |
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