@@ -113,9 +113,7 @@ Code coverage is __88%__ which seems acceptable.
113113[ Opinions differ on what is an acceptable level of code coverage.
114114As 100% code coverage is not always reasonable (for instance in this
115115case), my opinion is that 70% is a minimum acceptable value. But a
116- higher level of code coverage is of course very desirable. Adding
117- a new test for the first uncaught exception (__ ExceptionWithDuplicateMember__ )
118- raises the code coverage to __ 89%__ - which is an improvement.]
116+ higher level of code coverage is of course very desirable.]
119117
120118Of course, we can drill down into the code with an HTML report as well:
121119
@@ -148,14 +146,18 @@ Coverage HTML written to dir htmlcov
148146$
149147```
150148
151- Looking at ` htmlcov/index.html ` and driling down into ` secret_santa.py ` we can see that
149+ Looking at ` htmlcov/index.html ` and drilling down into ` secret_santa.py ` we can see that
152150we do not have any coverage in our ` main ` routine (this is expected) but there are also
153151two exceptions that do not get tested. The second is a catch-all, so cannot be fixed.
154152
155153However, the first exception not being tested is an oversight. This means another test
156154should be written to check for this exception. And so code coverage has highlighted a
157155soft area in our testing. This is unlikely to be critical, but better safe than sorry.
158156
157+ [ Adding a test for the first uncaught exception raises the code coverage to __ 89%__ .
158+ But then the addition of more code to the ` main ` routine dropped this number back
159+ down to __ 88%__ .]
160+
159161## Run
160162
161163Run the application as follows:
@@ -213,7 +215,6 @@ Family member (or CR to stop):
213215All family members entered, working out exchanges
214216
215217Not enough unpartnered members for a solution!
216-
217218$
218219```
219220
0 commit comments