Skip to content

TST: Add coverage to statespace package - #2524

Merged
josef-pkt merged 16 commits into
statsmodels:masterfrom
ChadFulton:ss-coverage
Jul 14, 2015
Merged

josef-pkt merged 16 commits into
statsmodels:masterfrom
ChadFulton:ss-coverage

Conversation

@ChadFulton

Copy link
Copy Markdown
Member

No description provided.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

no docstrings for test functions, use # code comments.
The message when a test fails will use the docstring instead of the premade standard message.

@josef-pkt

Copy link
Copy Markdown
Member

@ChadFulton Make one of the tests fail and check the failure message.
AFAIK, we never use docstrings for test functions or test methods. Although, we can use docstring for a test class (class docstring), according to a previous PR.

Otherwise, Can I just merge this?

@ChadFulton

Copy link
Copy Markdown
Member Author

AFAIK, we never use docstrings for test functions or test methods. Although, we can use docstring for a test class (class docstring), according to a previous PR.

Thanks for reminding me. I'll change it.

Otherwise, Can I just merge this?

If possible, I'd like to wait to add coverage also for mlemodel.py (which is at 78% right now). I'll be able to do that tomorrow.

@ChadFulton

Copy link
Copy Markdown
Member Author

When this is green it should be good to merge.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

this should not be a python assert in unit tests. Either use numpy's assert_equal (should be more informative in this case) or assert_ (trailing underline)

(Main traditional reason, python assert are removed when byte compiling python with -o flag.)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

also applies to many other case below

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

assert_equal has the advantage that it shows the values of the comparison in a failure, while assert_ only shows the boolean

@josef-pkt

Copy link
Copy Markdown
Member

I only did a superficial skimming.

Looks good, but the assert should be cleaned up.

@ChadFulton

Copy link
Copy Markdown
Member Author

Looks good, but the assert should be cleaned up.

Thanks for the note, I cleaned out all the python asserts in the tests.

@josef-pkt

Copy link
Copy Markdown
Member

no more assert, all green, merging

Thanks @ChadFulton

josef-pkt added a commit that referenced this pull request Jul 14, 2015
TST: Add coverage to statespace package
@josef-pkt
josef-pkt merged commit 63499e1 into statsmodels:master Jul 14, 2015
@ChadFulton
ChadFulton deleted the ss-coverage branch July 16, 2015 23:36
@josef-pkt josef-pkt added this to the 0.7 milestone Sep 9, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants