Skip to content
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 version update unit test #347

Merged
merged 1 commit into from
Jan 20, 2024

Conversation

emanspeaks
Copy link
Contributor

Previously, the unit test test_version_update_pypi() was not correctly loading the server configuration. The test was passing simply because the first assertion assumed a configuration was used that happened to match the default configuration. If the configuration of f90_config.json were to be changed in a way that should affect the test, the test would have failed.

The unit test is updated to match the paradigm of the other unit tests in this file, deferring the server init to unittest_server_init(), which does correctly load the configuration.

Furthermore, if the unit tests are run in a conda environment, the test was erroneously failing. In such an environment, the expected outcome should be different than the one assumed by the CI. In order to satisfy both, the unit test now checks the environment and determines the expected value for the assertion accordingly so it passes in all environments.

This supersedes #346 and incorporates some changes that crept into #341. Recommend merging this first, and then the #341 PR can be rectified.

@emanspeaks emanspeaks requested a review from gnikit as a code owner January 7, 2024 02:50
Copy link

codecov bot commented Jan 7, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (8263781) 87.51% compared to head (8d55ac8) 87.51%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #347   +/-   ##
=======================================
  Coverage   87.51%   87.51%           
=======================================
  Files          35       35           
  Lines        4756     4756           
=======================================
  Hits         4162     4162           
  Misses        594      594           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@emanspeaks emanspeaks mentioned this pull request Jan 7, 2024
@emanspeaks
Copy link
Contributor Author

This one hasn't seen any activity for a bit, so wanted to poke on it. It's fairly minor since it's only affecting unit tests, but it is something that was split off from #341 already in an attempt to descope that one a bit. I think this one should be ready to go and hopefully isn't too controversial.

@gnikit gnikit merged commit 71d5f40 into fortran-lang:master Jan 20, 2024
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants