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

add tests for Package #1712

Merged
merged 12 commits into from Mar 31, 2024
Merged

add tests for Package #1712

merged 12 commits into from Mar 31, 2024

Conversation

gonuke
Copy link
Member

@gonuke gonuke commented Mar 27, 2024

Some simple tests for Package - hoping for a positive change to coverage!

src/product.cc Outdated
Comment on lines 81 to 83
if (ctx_ == NULL) {
throw ValueError("Package Id cannot be changed with NULL context");
}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nuclearkatie - in material.cc we just return rather than throwing an error in this case. Do we need to throw an error?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you're right, we should probably just return

Copy link

github-actions bot commented Mar 27, 2024

Downstream Build Status Report - 6aa3f9e - 2024-03-30 21:24:30 +0000

Build FROM cyclus_20.04_apt/cyclus
  • Cycamore: Success
  • Cymetric: Success
Build FROM cyclus_20.04_conda/cyclus
  • Cycamore: Success
  • Cymetric: Success
Build FROM cyclus_22.04_apt/cyclus
  • Cycamore: Success
  • Cymetric: Success
Build FROM cyclus_22.04_conda/cyclus
  • Cycamore: Success
  • Cymetric: Success

@coveralls
Copy link
Collaborator

coveralls commented Mar 27, 2024

Pull Request Test Coverage Report for Build 8493492016

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 17 of 18 (94.44%) changed or added relevant lines in 2 files are covered.
  • 5 unchanged lines in 2 files lost coverage.
  • Overall coverage decreased (-0.004%) to 32.595%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/product.cc 1 2 50.0%
Files with Coverage Reduction New Missed Lines %
build/cyclus/py_lib_.cxx 1 34.76%
build/cyclus/py_agents_.cxx 4 33.95%
Totals Coverage Status
Change from base Build 8453585633: -0.004%
Covered Lines: 53076
Relevant Lines: 129079

💛 - Coveralls

@nuclearkatie
Copy link
Contributor

This looks good to me @gonuke. Do you plan to add more tests to it? If not I'll merge if you convert from draft

@gonuke
Copy link
Member Author

gonuke commented Mar 29, 2024

I was going to add tests for GetFillMass but I don't think it all works well enough so we'll leave that for a future test/PR.

@gonuke gonuke marked this pull request as ready for review March 29, 2024 21:48
Copy link
Contributor

@nuclearkatie nuclearkatie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

src/package.cc Show resolved Hide resolved
src/product.cc Outdated
Comment on lines 81 to 83
if (ctx_ == NULL) {
throw ValueError("Package Id cannot be changed with NULL context");
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you're right, we should probably just return

Co-authored-by: Katie Mummah <radioactivekate@gmail.com>
Signed-off-by: Paul Wilson <paul.wilson@wisc.edu>
@nuclearkatie nuclearkatie merged commit 2fcd1be into cyclus:main Mar 31, 2024
10 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.

None yet

3 participants