-
Notifications
You must be signed in to change notification settings - Fork 141
Fix tests #430
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
Fix tests #430
Changes from all commits
bbbb259
5bee2c3
00a85a4
3b4f546
b8ad451
a84704a
906b502
aaea251
c326099
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| # This Bash script must be sourced, not executed | ||
| # Customizations required for the server that currently runs Jenkins | ||
|
|
||
| conda install --yes mpi4py tensorflow | ||
| conda install --yes mpi4py tensorflow scipy\<1.3 | ||
| module unload gcc |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -33,10 +33,13 @@ def test_fit_shapes(): | |
| "Segmentation from find_events not correctly normalized" | ||
|
|
||
| es_invalid = EventSegment(K) | ||
| with pytest.raises(ValueError, message="T < K should cause error"): | ||
| with pytest.raises(ValueError): | ||
| es_invalid.model_prior(K-1) | ||
| with pytest.raises(ValueError, message="#Events < K should cause error"): | ||
| # ``with`` block is about to end with no error. | ||
| pytest.fail("T < K should cause error") | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It wasn't obvious to me why adding pytest.fail() here or how that would work until reading the link you added in the commit message.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done. |
||
| with pytest.raises(ValueError): | ||
| es_invalid.set_event_patterns(np.zeros((V, K-1))) | ||
| pytest.fail("#Events < K should cause error") | ||
|
|
||
|
|
||
| def test_simple_boundary(): | ||
|
|
@@ -60,11 +63,13 @@ def test_event_transfer(): | |
| es = EventSegment(2) | ||
| sample_data = np.asarray([[1, 1, 1, 0, 0, 0, 0], [0, 0, 0, 1, 1, 1, 1]]) | ||
|
|
||
| with pytest.raises(NotFittedError, message="Should need to set variance"): | ||
| with pytest.raises(NotFittedError): | ||
| seg = es.find_events(sample_data.T)[0] | ||
| pytest.fail("Should need to set variance") | ||
|
|
||
| with pytest.raises(NotFittedError, message="Should need to set patterns"): | ||
| with pytest.raises(NotFittedError): | ||
| seg = es.find_events(sample_data.T, np.asarray([1, 1]))[0] | ||
| pytest.fail("Should need to set patterns") | ||
|
|
||
| es.set_event_patterns(np.asarray([[1, 0], [0, 1]])) | ||
| seg = es.find_events(sample_data.T, np.asarray([1, 1]))[0] | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did this block go away?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
MACOSX_DEPLOYMENT_TARGETis set byconda-buildbased on the SDK we pass. The compiler variables are not used; instead,conda-buildinstalls and uses compilers based on its configuration.