Closed jsiirola closed 4 years ago
@jsiirola Given the nature of these changes, I think it's important to add a few tests to confirm that these changes capture the behavior that motivated the PR.
@whart222: absolutely. Tests added.
Was there a typo in the last test from this PR? It seems to be testing the wrong function.
On Dec 13, 2019, at 11:28 AM, Bethany Nicholson notifications@github.com wrote:
Merged #70 into master.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.
@ghackebeil I'm not sure what you're referring to. Where do you think there's an error?
Fixes: N/A
Summary/Motivation:
This improves the robustness of
import_file()
andrun_file()
so that thesys.path
is not left in an altered state in the event that the import raises an exception. This also switches to using tools fromsys.path
for performing path manipulations (instead of hard-coded/
and\
characters).Changes proposed in this PR:
sys.path
when imports raise exceptions/
and\
path separator characters.Legal Acknowledgement
By contributing to this software project, I agree to the following terms and conditions for my contribution: