Closed mathieuboudreau closed 3 years ago
@jvelazquez-reyes please test this branch and if it works for you and makes sense, merge it into your branch.
Hi @mathieuboudreau,
Thank you for refactoring the tests. I noticed that you removed the test (1- testing that if you give an input temperature that is one of the temperatures already in the dictionnary, the value that's the output is exactly the same as the preset one
) that you proposed in our other PR discussion. To implement the original test, can I take one of the values from the output of the function get_reference_NIST_values
to compare it with our output?
I know exactly where is the source of the assertion error beacause I forced the outputArray
to be (14, len(input_temperature))
in size. That is, if input temperature = 20
the output shape is (14,1)
and if input_temperature
is an N-size array the output is of size (14,N)
To get the tests pass, I will reformat our current output to (14,)
when input temperature = 20
and I will keep the functionality in case the user pass an array as input_temperature, unless you indicate otherwise.
Hi @jvelazquez-reyes,
Thanks for getting a draft of the tests done! I've refactored them into a format such that they are now compatible with the PyTest tool.
I also modified your tests to be more in line with how I wanted to define the behaviour.
To use the tests, you need to install the repo as a package and then run a command. Here are the steps:
Here is the current output:
Note that the two tests currently fail. This isn't a problem with the tests, but a problem with the code not acting the way we expect it to behave (i.e. the array outputed by the temperature_correction isn't in the same format as the one outputted by get_reference_NIST_values). Once we merge this PR into your branch (this PR is already setup to do that and not into master), you'll just have to find a way to reformat the array inside temperature_correction at the end so that it matches get_reference_NIST_values and the tests pass.
Let me know if anything isn't clear enough and we can setup a meeting next week to discuss (I'm on vacation this week)