-
Notifications
You must be signed in to change notification settings - Fork 44
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
Fix 291 tests #294
Fix 291 tests #294
Conversation
Looks like a merge conflict - can you merge in main? |
12c9e88
to
b83aa6a
Compare
pt.frame_to_hyper(frame, tmp_hyper, table="test") | ||
pt.frame_from_hyper(tmp_hyper, table="test") | ||
assert not pathlib.Path("hyperd.log").is_file() | ||
assert not (tmp_path / "hyperd.log").is_file() |
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.
I don't think there is anything that guarantees tmp_hyper and tmp_path are the same directory, so I'm not sure this really tests anything.
When running the test suite locally I would still see some tests generating a hyperd.log (not the ones you fixed) so I think there is something else in our test suite / code base that generates this outside of the work you already did
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.
I used tmp_path here to change the working directory to a temporary one, so that if a hyperd.log is generated, it does not persist in the file system across other tests; conversely, if other tests generate a hyperd.log file, the assert does not fail because of the file being present before the test runs (at least, that's the idea, hopefully it works as intended). The temporary directory does not need to be the same as the one where the hyper file is created.
Indeed, every test that uses a HyperProcess without the parameter {"log_config": ""}
generates a hyperd.log file. That's the case of test_reads_nullable_columns in test_reader.py, and of many others.
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.
Ah...so its probably just the other tests then. Nice find - we can just update the configuration for those tests directly then right? I wish this was the default on the tableauhyperapi side...
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.
To my knowledge, there's no way to disable it globally and the parameter must be passed every time a HyperProcess is instantiated (but I might (and hope to) be wrong). But that's right, disabling the configuration in every test should do it.
Thanks for the PR but this has been superseded by https://github.com/innobi/pantab/pull/304/files |
closes #291