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 #70

Merged
merged 5 commits into from
Aug 9, 2016
Merged

Improve test coverage #70

merged 5 commits into from
Aug 9, 2016

Conversation

graysonarts
Copy link
Contributor

Address some additional testing for #63


class FieldsUnitTest(unittest.TestCase):
def test_field_throws_if_no_data_passed_in(self):
try:
Copy link
Contributor

@t8y8 t8y8 Aug 9, 2016

Choose a reason for hiding this comment

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

Style preference nit, I like context mangers for the exception tests because self.fail somehow looks ugly to me.

with self.assertRasises(AttributeError, "Field should have thrown"):
    Field()

@t8y8
Copy link
Contributor

t8y8 commented Aug 9, 2016

🚀

Really minor comments.

Can you post the coverage update %'s? Curious!

@graysonarts
Copy link
Contributor Author

Okay, I'll make those changes and send another update

Name                                     Stmts   Miss Branch BrPart  Cover
--------------------------------------------------------------------------
tableaudocumentapi/__init__.py               6      0      0      0   100%
tableaudocumentapi/connection.py            35      1      2      0    97%
tableaudocumentapi/datasource.py            83      0     18      0   100%
tableaudocumentapi/dbclass.py                3      0      0      0   100%
tableaudocumentapi/field.py                 81      2     30      2    96%
tableaudocumentapi/multilookup_dict.py      43      2     14      0    96%
tableaudocumentapi/workbook.py              55      0     16      0   100%
tableaudocumentapi/xfile.py                 65      0     16      0   100%
--------------------------------------------------------------------------
TOTAL                                      371      5     96      2    99%

Note: assertRaises does not take a message
@t8y8
Copy link
Contributor

t8y8 commented Aug 9, 2016

🐓 🚀 🌕

Edit: Yeah, the msg argument is 3.3+, sorry :(

@graysonarts graysonarts merged commit 90d6a28 into tableau:development Aug 9, 2016
@graysonarts graysonarts deleted the improve-coverage branch August 9, 2016 22:38
@graysonarts graysonarts modified the milestone: 2016.08 release Aug 29, 2016
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.

2 participants