generated from allenai/python-package-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add codecov reports * add codecov reports changelog * add codecov fix token * readme and new tests * Updated coverage.svg * add cov test * fish test * Updated coverage.svg * Merge branch 'main' into codecov
- Loading branch information
1 parent
0f252dd
commit c6be5bc
Showing
6 changed files
with
55 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
from cosmicfishpie.LSSsurvey.photo_cov import PhotoCov | ||
|
||
# You might need to add more imports depending on what you're testing | ||
|
||
|
||
def test_photo_cov_initialization(photo_fisher_matrix): | ||
cosmopars = {"Omegam": 0.3, "h": 0.7} # Add more parameters as needed | ||
cosmoFM = photo_fisher_matrix | ||
photo_cov = PhotoCov(cosmopars, cosmoFM.photopars, cosmoFM.IApars, cosmoFM.biaspars) | ||
assert isinstance(photo_cov, PhotoCov) | ||
assert photo_cov.cosmopars == cosmopars | ||
|
||
|
||
def test_get_cls(photo_fisher_matrix): | ||
cosmoFM = photo_fisher_matrix | ||
cosmopars = {"Omegam": 0.3, "h": 0.7} # Add more parameters as needed | ||
photo_cov = PhotoCov(cosmopars, cosmoFM.photopars, cosmoFM.IApars, cosmoFM.biaspars) | ||
allparsfid = dict() | ||
allparsfid.update(cosmopars) | ||
allparsfid.update(cosmoFM.IApars) | ||
allparsfid.update(cosmoFM.biaspars) | ||
allparsfid.update(cosmoFM.photopars) | ||
cls = photo_cov.getcls(allparsfid) | ||
assert isinstance(cls, dict) | ||
# Add more specific assertions based on what you expect in the result | ||
|
||
|
||
def test_get_cls_noise(photo_fisher_matrix): | ||
cosmoFM = photo_fisher_matrix | ||
cosmopars = {"Omegam": 0.3, "h": 0.7} # Add more parameters as needed | ||
photo_cov = PhotoCov(cosmopars, cosmoFM.photopars, cosmoFM.IApars, cosmoFM.biaspars) | ||
cls = photo_cov.getcls(photo_cov.allparsfid) | ||
noisy_cls = photo_cov.getclsnoise(cls) | ||
assert isinstance(noisy_cls, dict) | ||
# Add more specific assertions based on what you expect in the result |