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

Improve test coverage #134

Open
laurencejackson opened this issue Nov 4, 2021 · 4 comments
Open

Improve test coverage #134

laurencejackson opened this issue Nov 4, 2021 · 4 comments
Labels
good first issue Good for newcomers tests Unit tests

Comments

@laurencejackson
Copy link
Collaborator

laurencejackson commented Nov 4, 2021

Our test coverage is currently at around 71% which could be better. The line numbers in the table below show which lines are currently not run during any of the tests. We should expand our existing tests or (if necessary) write new ones to cover these lines.

This is another good issue to get people familiar with the automatic testing system.

File Stmts Miss Cover Missing
hazenlib
init.py 132 67 49% 128, 132, 142, 147, 183–186, 191–196, 208, 211–218, 237–239, 256–258, 276–278, 286, 290–293, 297, 312–319, 324–360
exceptions.py 21 4 81% 17–21
ghosting.py 156 50 68% 24, 89–90, 94, 104–105, 132–133, 142–143, 198–226, 233–251, 255
relaxometry.py 308 90 71% 238–256, 630, 689–691, 745, 793–815, 833–848, 1168–1171, 1180–1183, 1195–1208, 1211–1216, 1228–1258
slice_position.py 109 20 82% 72–73, 98, 182, 189–202, 210, 218–219, 230
slice_width.py 287 45 84% 23, 26, 30, 34–39, 105, 275, 280–281, 287, 292, 355–356, 591–630, 666–669, 672–675
snr.py 138 50 64% 39–44, 72, 147–157, 181–191, 195–199, 231–242, 247–255, 283–294, 318, 326–328, 331
spatial_resolution.py 290 99 66% 84–142, 156, 238, 278–285, 313, 443–476, 497–514
tools.py 66 9 86% 42–49, 88, 97, 112–113
uniformity.py 79 22 72% 68–69, 76, 110–122, 134–136, 139, 143–146, 154
TOTAL 1586 456 71%  
@laurencejackson laurencejackson added the good first issue Good for newcomers label Nov 4, 2021
@tomaroberts tomaroberts self-assigned this Nov 8, 2021
@Lucrezia-Cester
Copy link
Contributor

Hi @tomaroberts ! I assigned myself this issue #90 (add tests for init in hazenlib). Since you have this issue, where hazenlib init is included, I was wondering if you were ok with me writing the tests for the init module.

@tomaroberts
Copy link
Collaborator

Discussed tests_snr.py with Laurence. Current tests are integration tests. Will be better to have specific unit tests for each function in snr.py.

@tomaroberts
Copy link
Collaborator

Hi @tomaroberts ! I assigned myself this issue #90 (add tests for init in hazenlib). Since you have this issue, where hazenlib init is included, I was wondering if you were ok with me writing the tests for the init module.

@Lucrezia-Cester – go for it. I'm going to start with tests_snr.py and then move onto others after that.

@sophie22
Copy link
Collaborator

more recent test coverage stats: from version v1.3.1

FileStmtsMissCoverMissing
hazenlib
   ACRObject.py1071190%74, 77–79, 84–87, 125, 168–169
   HazenTask.py28389%41–43
   \_\_init\_\_.py561573%166, 197–200, 202–206, 208–210, 225–230, 234
   exceptions.py21576%17–21, 38
   utils.py1894377%61, 65, 75, 80, 117, 124–129, 140, 143–150, 170–172, 190–192, 211–213, 222, 227, 233, 284, 287, 295–300, 303, 346, 355, 371
hazenlib/tasks
   acr_geometric_accuracy.py1196248%42–86, 96–121, 134–168
   acr_ghosting.py1074261%35–51, 77–79, 109–111, 145–187
   acr_slice_position.py1364865%47–68, 194–241
   acr_slice_thickness.py1366056%34–53, 162–224
   acr_snr.py1365857%46, 51–92, 102, 172–182, 216–231, 264–281
   acr_spatial_resolution.py2066867%59–86, 131, 174, 187–196, 278–330
   acr_uniformity.py813260%38–56, 112–138
   ghosting.py1515166%19–36, 51, 113–114, 118, 128–129, 155–157, 174–176, 222–259
   relaxometry.py2908969%207–208, 210, 221–224, 230–236, 268–312, 353, 387–405, 580, 626–628, 695, 769–791, 809–824
   slice_position.py1244068%26, 31–62, 114–115, 141, 221, 229–247
   slice_width.py3505285%36–38, 42, 107, 166–187, 441, 446–447, 453, 458, 516–517, 767–809
   snr.py1686760%61, 78–83, 179–197, 212–221, 239–249, 276–286, 291–301, 332–346, 351–359, 388–402
   snr_map.py107199%152
   spatial_resolution.py2484482%41–43, 47, 68, 153, 212, 338–375
   uniformity.py791976%47–49, 53, 95–96, 103, 137–152
TOTAL286481072% 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers tests Unit tests
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

4 participants