-
Notifications
You must be signed in to change notification settings - Fork 0
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
test: Improving conftest.py
so that local configuration is handled
#187
test: Improving conftest.py
so that local configuration is handled
#187
Conversation
https://github.com/ansys/pyansys-sound into feat/181-add-local-server-configuration-in-conftestpy
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.
Just a minor suggestion with no functional impact.
Also a question, will that allow us to add tests for existence of input files in feature classes? ( I remember we ran into an issue before when doing such tests because of the ambiguity of the file location between the host machine and the server)
@ansaminard probably no, because the feature classes should not be aware of whether they're in "Docker" or "local" configuration With the changes I've done in my PR, we know where the files are as long as we have access to the I'm trying to think of a way of doing that while writing those lines but all solutions that come to mind seems way too complex For the tests and the documentation, we're in a controlled environment, with as many input file paths as we have users, this will probably be too complex |
https://github.com/ansys/pyansys-sound into feat/181-add-local-server-configuration-in-conftestpy
for more information, see https://pre-commit.ci
https://github.com/ansys/pyansys-sound into feat/181-add-local-server-configuration-in-conftestpy
Adapted
conftest.py
in such way that it is transparent for the user to use whether he's in local or "docker" configuration with the DPF Server.Main Changes
connect_to_or_start_server
flute_psd.txt
this file is needed only locally as we're using native python functions to read it and not DPF Operatorsdpf_sound_test_server
is not needed anymore, everything is done inpytest_configure
get_absolute_path_for*
are not relevant anymore and caused maintainability problems so I removed them (and thus removed the file_get_example_file.py
, don't panick, there's stilldownload.py
that collect files for our examples and is still very relevant)Side Changes
source_control_spectrum
I had a text formatting error locally, I changed the syntax but the result is the sameprominence_ratio
andtone_to_noise_ratio
there was a missing fixtureshow_mockup
for plot tests that caused a bug, I added themprominence_ratio
andtone_to_noise_ratio
I changed the way we obtained `flute_psd.txtDoc
https://dpf.docs.pyansys.com/version/stable/getting_started/dpf_server.html