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

Coverage Report #63

Closed
t8y8 opened this issue Jul 26, 2016 · 8 comments
Closed

Coverage Report #63

t8y8 opened this issue Jul 26, 2016 · 8 comments

Comments

@t8y8
Copy link
Contributor

t8y8 commented Jul 26, 2016

(From my HEAD, which includes #62)

Name                                   Stmts   Miss  Cover
----------------------------------------------------------
tableaudocumentapi/__init__.py             6      0   100%
tableaudocumentapi/connection.py          29      1    97%
tableaudocumentapi/datasource.py          85      0   100%
tableaudocumentapi/field.py               83      7    92%
tableaudocumentapi/multilookup_dict.py    45     10    78%
tableaudocumentapi/workbook.py            55      2    96%
tableaudocumentapi/xfile.py               65      3    95%
test/__init__.py                           2      0   100%
test/bvt.py                              208      1    99%
test/test_datasource.py                   64      0   100%
test/test_multidict.py                    38      1    97%
test/test_workbook.py                      9      0   100%
@t8y8
Copy link
Contributor Author

t8y8 commented Jul 26, 2016

I can share the htmlcov report too, but basically we're doing really well, it's just repr or guards that aren't executed.

One glaring item from this though, is in multilookup_dict.py __setitem__ marks as never executed, not sure I believe that

@graysonarts
Copy link
Contributor

I'll have to take a look at it. I'm sure it's accurate, I might not ever do
an actual setitem in the tests.
On Mon, Jul 25, 2016 at 9:13 PM Tyler Doyle [email protected]
wrote:

I can share the htmlcov report too, but basically we're doing really well,
it's just repr or guards that aren't executed.

One glaring item from this though, is in multilookup_dict.py -setitem_
marks as never executed, not sure I believe that


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#63 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAFxVaB_23k-HXPRGqVj0DQ1TJNIsn50ks5qZYl4gaJpZM4JUxK3
.

graysonarts pushed a commit that referenced this issue Jul 27, 2016
@t8y8
Copy link
Contributor Author

t8y8 commented Aug 6, 2016

Name                                   Stmts   Miss  Cover
----------------------------------------------------------
tableaudocumentapi/__init__.py             6      0   100%
tableaudocumentapi/connection.py          45      1    98%
tableaudocumentapi/datasource.py         100      0   100%
tableaudocumentapi/dbclass.py              3      0   100%
tableaudocumentapi/field.py               83      5    94%
tableaudocumentapi/multilookup_dict.py    49      5    90%
tableaudocumentapi/workbook.py            55      2    96%
tableaudocumentapi/xfile.py               65      2    97%
test/__init__.py                           2      0   100%
test/bvt.py                              232      1    99%
test/test_datasource.py                   68      0   100%
test/test_multidict.py                    45      1    98%
test/test_workbook.py                      9      0   100%

Wooooo, looking even better.

Looks like the last easy resolve is that we never actually run a test where the .name property returns an alias, or falls back to returning an ID

    @property
    def name(self):
        alias = getattr(self, 'alias', None)
        if alias:
            return alias

        caption = getattr(self, 'caption', None)
        if caption:
            return caption

        return self.id

@graysonarts
Copy link
Contributor

What tool are you using to create the coverage report? I want to check my improvements before submitting the next additional tests

@t8y8
Copy link
Contributor Author

t8y8 commented Aug 9, 2016

pip install coverage

Then

coverage run setup.py test
coverage html
open htmlcov/index.html

or, for the plaintext
coverage report > report.txt

The HTML is nice because you get to see line by line what is executed

@graysonarts
Copy link
Contributor

awesome thanks, I'm working on some changes to increase coverage. I also found some redundant code which I've now removed!

@t8y8
Copy link
Contributor Author

t8y8 commented Aug 15, 2016

We're up to an average of 99% which I'm pretty happy with!

Think we can close this?

(We can optionally hook up coveralls, which will do this on commit like TravisCI, but that can be a different enhancement request)

@graysonarts
Copy link
Contributor

yup, I think it's fine to close this.

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

No branches or pull requests

2 participants