Repository navigation
WIP/TST: enable/mark mangled/commented-out tests - #5768
Conversation
|
Hello @jbrockmendel! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found: There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻 Comment last updated at 2019-07-12 13:22:53 UTC |
|
|
||
| def t_est_smoothconf_data(self): | ||
| @pytest.mark.smoke # TOOD: make this an actual test? | ||
| def test_smoothconf_data(self): |
There was a problem hiding this comment.
this one might be expensive
maybe better not to run it
There was a problem hiding this comment.
could also add slow marker
| ------- | ||
| mvt : instance of MVT | ||
| instance of multivariate t distribution given by affine | ||
| mvt : instance of MVNormal |
There was a problem hiding this comment.
Sounds good. BTW while looking through the sandbox.distributions code I found a lot of it to be really nice (also TheilGLS stood out). I'm looking forward to seeing what else you have in mind in this area.
| @@ -65,61 +65,54 @@ def test_basic(self): | |||
|
|
|||
|
|
|||
| def test_basic_method(self): | |||
There was a problem hiding this comment.
don't change this,
if hasattr(self, 'res1m') should stay in both test functions
There was a problem hiding this comment.
OK. Are there more forthcoming cases where the attribute doesn't exist yet?
There was a problem hiding this comment.
most likely or maybe, support for constrained fitting is still missing in some models, e.g. my discrete PR to add offset and fit_constrained to Binary models.
I don't remember the details of the unit tests without going through them.
This would change the usage for subclasses, so it's not a innocent change and should stay as the original author (I) intended.
|
looks good overall don't change the one kde test is the only one that looks expensive to add (and will not assert anything) |
| try: | ||
| duncan = get_rdataset("Duncan", "carData", cache=cur_dir) | ||
| except (HTTPError, URLError): | ||
| except (HTTPError, URLError): # pragma: no cover |
There was a problem hiding this comment.
These are already in coveragerc
There was a problem hiding this comment.
Looks like its not in coveragerc_travis. I'll update it there. I missed the discussion that led to having multiple coveragerc files
There was a problem hiding this comment.
If we could get back to just one coveragerc file, we could drop that and put it into setup.cfg
| message = ('test: ll_0 not available, llnull=%6.4F' | ||
| % res1.llnull) | ||
| warnings.warn(message) | ||
| res1 = (self.res1m if not hasattr(self.res1m, '_results') |
There was a problem hiding this comment.
You could fix the indentation. If not hasattr(): skip then no indentation needed below.
There was a problem hiding this comment.
josef and I are working together pretty well in this thread, I'd like to keep that going by not pushing on this.
There was a problem hiding this comment.
What's the problem with intentation?
this looks like a regular if else to me.
There was a problem hiding this comment.
The function is
if cond:
Lots of lines fo test code:
else:
skipBetter hygiene is to do
if not cond:
skip
lots of test code (<- 1 level less indent, and no need to read to the bottom to figure out what is going on)This is just hygiene, so clearly not essential.
|
|
||
| try: | ||
| import matplotlib.pyplot as plt | ||
| except ImportError: |
There was a problem hiding this comment.
You should add except ImportError to coverage. This should be skipped everywhere.
|
Updated with suggested edits. Outstanding questions:
My inclination is to separate out the passing parts of this and keep a) the newly enabled and failing tests and b) the FIXME/TODO comments in a WIP PR that I'll slowly whittle down. Thoughts? |
35c30e8 to
3f79cab
Compare
Codecov Report
@@ Coverage Diff @@
## master #5768 +/- ##
==========================================
+ Coverage 82.3% 82.64% +0.33%
==========================================
Files 593 593
Lines 93728 93639 -89
Branches 10356 9605 -751
==========================================
+ Hits 77146 77385 +239
+ Misses 14185 13868 -317
+ Partials 2397 2386 -11
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #5768 +/- ##
=========================================
Coverage ? 82.79%
=========================================
Files ? 595
Lines ? 93754
Branches ? 10332
=========================================
Hits ? 77628
Misses ? 13748
Partials ? 2378
Continue to review full report at Codecov.
|
|
Clopen to trigger CI |
|
Needs rebase |
|
Looks like cvxopt doesn’t provide a manylinux wheel for py34. Not sure where the six version mismatch comes from. Fine to wait until after we drop py34 since this isn’t merge-ready anyway. |
| from scipy.interpolate import splev | ||
| except ImportError: # pragma: no cover | ||
| except ImportError: | ||
| raise ImportError("spline functionality requires scipy") |
There was a problem hiding this comment.
this seems unreachable. maybe its a specific scipy version?
|
@jbrockmendel Could you rebase so we can see if this is OK now? |
Based on a read through the coverage statistics for test files.
Might be worth adding
except ImportError:to the .coveragerc exclusions; then again we might want to specifically make sure to test no-matplotlib environments.Not remotely confident that the addition of cvxopt is in the right place. Suggestions welcome.
@ChadFulton there are a bunch of un-hit cases in statespace test files separate from the ones marked here, e.g. https://coveralls.io/builds/23474023/source?filename=statsmodels%2Ftsa%2Fstatespace%2Ftests%2Ftest_simulation_smoothing.py#L441 any thoughts on how/whether these can/should be reached? (no hurry, there's plenty in this WIP to keep me occupied for a bit)