Skip to content

Commit

Permalink
Unit tests for #660 - Additional tools to add to PATH
Browse files Browse the repository at this point in the history
Note how the config change is not part of the cache, which is what you want.
  • Loading branch information
bfloch committed Jul 11, 2019
1 parent 4c45980 commit 210df34
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/rez/tests/test_shells.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"""
from __future__ import print_function

from rez.config import config
from rez.system import system
from rez.shells import create_shell
from rez.resolved_context import ResolvedContext
Expand Down Expand Up @@ -328,6 +329,23 @@ def _alias_after_path_manipulation():
# code 0.
_execute_code(_alias_after_path_manipulation)

@shell_dependent()
def test_standard_system_paths_visibility(self):

config.override("standard_system_paths", ["SinglePath"])
sh = create_shell()
self.assertListEqual(sh.get_syspaths(), ["SinglePath"])

config.override("standard_system_paths_visibility", "prepend")
config.override("standard_system_paths", ["AnotherPath"])
sh = create_shell()
self.assertEqual(sh.get_syspaths()[0], "AnotherPath")

config.override("standard_system_paths_visibility", "append")
config.override("standard_system_paths", ["YetAnotherPath"])
sh = create_shell()
self.assertEqual(sh.get_syspaths()[-1], "YetAnotherPath")


if __name__ == '__main__':
unittest.main()
Expand Down

0 comments on commit 210df34

Please sign in to comment.