NSLS-II / metadatastore

DEPRECATED: Incorporated into https://github.com/NSLS-II/databroker
Other
2 stars 11 forks source link

~~100%~~ ~~99%~~ 98% test coverage #173

Closed ericdill closed 9 years ago

ericdill commented 9 years ago

at least locally, let's see what coveralls thinks

tacaswell commented 9 years ago

I am not a huge fan of #pragma: no cover in the code base. I would much rather we fake up __import__ http://stackoverflow.com/a/2481588/380231 to fake the exceptions or just leave them untested.

ericdill commented 9 years ago

is it the actual statement "#pragma: no cover" that you don't like or the concept of adding a line comment to ignore coverage for that line that you don't like?

ericdill commented 9 years ago

If it is the "#pragma: no cover" that you don't like, we can actually use anything we want. Other options include:

or really any other line comment that you can think of, those were just the fun ones that came to mind

ericdill commented 9 years ago

Grrrr this is so frustrating!!

Coverage on travis:

Name                                                   Stmts   Miss  Cover   Missing
------------------------------------------------------------------------------------
metadatastore                                              4      0   100%   
metadatastore.api                                          2      0   100%   
metadatastore.commands                                   333      5    98%   285-289, 926
metadatastore.conf                                        22      2    91%   51, 68
metadatastore.doc                                        105      3    97%   88-90, 128
metadatastore.examples                                     0      0   100%   
metadatastore.examples.sample_data                         0      0   100%   
metadatastore.examples.sample_data.common                 40      0   100%   
metadatastore.examples.sample_data.multisource_event      40      0   100%   
metadatastore.examples.sample_data.temperature_ramp       39      0   100%   
metadatastore.odm_templates                               40      0   100%   
metadatastore.utils                                        0      0   100%   
------------------------------------------------------------------------------------
TOTAL                                                    625     10    98%   
----------------------------------------------------------------------
Ran 95 tests in 1.380s
OK

Coverage on my laptop

Name                                                   Stmts   Miss  Cover   Missing
------------------------------------------------------------------------------------
metadatastore                                              4      0   100%   
metadatastore.api                                          2      0   100%   
metadatastore.commands                                   333      1    99%   926
metadatastore.conf                                        22      1    95%   51
metadatastore.doc                                        105      0   100%   
metadatastore.examples                                     0      0   100%   
metadatastore.examples.sample_data                         0      0   100%   
metadatastore.examples.sample_data.common                 40      0   100%   
metadatastore.examples.sample_data.multisource_event      40      0   100%   
metadatastore.examples.sample_data.temperature_ramp       39      0   100%   
metadatastore.odm_templates                               40      0   100%   
metadatastore.utils                                        0      0   100%   
------------------------------------------------------------------------------------
TOTAL                                                    625      2    99%   
----------------------------------------------------------------------
Ran 95 tests in 0.880s

OK
tacaswell commented 9 years ago

the concept of comments flagging skipping coverage tests

ericdill commented 9 years ago

Well then, here's a fun gotcha... after git clean -xfd, my local machine now produces results that match travis

ericdill commented 9 years ago

@tacaswell This is as much work as I am willing to put in for now. I am bored of trying to get all the lines covered. If you've got no objections, could you merge this in its current state?