Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rez-env output test is not testing on specified shell #1135

Closed
davidlatwe opened this issue Sep 28, 2021 · 0 comments · Fixed by #1136
Closed

rez-env output test is not testing on specified shell #1135

davidlatwe opened this issue Sep 28, 2021 · 0 comments · Fixed by #1136

Comments

@davidlatwe
Copy link
Contributor

In test case test_shells.TestShells.test_rez_env_output, it uses decorator per_available_shell, which iterates all available shells and use config.override to set testing target.

https://github.com/nerdvegas/rez/blob/8f965f6ed7ac438c1ea331940e6ad14f766564fa/src/rez/tests/util.py#L218-L221

However, when testing rez-env output, subprocess is called which actually won't take the config override and always testing on system default shell.

https://github.com/nerdvegas/rez/blob/8f965f6ed7ac438c1ea331940e6ad14f766564fa/src/rez/tests/test_shells.py#L183-L190

The var arg in above code should changed into

   ...
     def _test(txt): 
         ...
         args = [binpath, "--shell", config.default_shell, "--", "echo", txt]

I found this issue when I was tweaking code in CMD shell class and somehow the test result of PowerShell also gets affected and made me confused.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant