-
Notifications
You must be signed in to change notification settings - Fork 131
Respectable testing for cmorizers/obs/utilities.py and cmorizers/obs/cmorize_obs.py #1517
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
Conversation
OK mucho better:
This is ready for review guys 🍺 |
): | ||
run() | ||
|
||
os.chdir(curr_path) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
os.chdir(curr_path) |
Stuff should work independent from what the current working directory is. Is this needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
afraid it is, due to the cmorizer entering subdirs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is that a problem? Does some of the test code depend on the current working directory?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for explaining. In that case you might want to use a context manager, to avoid writing the stuff to the wrong output directory if the test fails, e.g.
@contextlib.contextmanager
def keep_cwd()
curr_path = os.getcwd()
try:
yield
finally:
os.chdir(curr_path)
and then run the test code with
with keep_cwd():
test_something()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
legend, lemme do this now 🍺
Co-Authored-By: Bouwe Andela <bouweandela@users.noreply.github.com>
Co-Authored-By: Bouwe Andela <bouweandela@users.noreply.github.com>
pk @bouweandela plugged in changes you suggested ma man - merge? 🍺 |
hey @bouweandela there's still issues with the Julia installation pffft --> actually prob not since these are run against the old --> actually I just ran |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi V,
Sorry to be so slow with looking at this pull request. It looks fine, just some minor comments. Could you merge the latest version of the master branch into this one, so we are sure things still work?
): | ||
run() | ||
|
||
os.chdir(curr_path) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is that a problem? Does some of the test code depend on the current working directory?
cheers @bouweandela - I can't seem to be able to reply to your last comment in line (weird) - so the cmorizers performs an |
so this thing is failing tests with some really random stuff that I don't understand where they're coming from |
ah, it's me who's random! bleh |
Tasks
If you need help with any of the tasks above, please do not hesitate to ask by commenting in the issue or pull request.
Closes #1516 and closes #1518