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
Fixed #297 update tests to check error strings #303
Conversation
thanks @jeff-hernandez. circleci is having problems sending the status back to github right now, but looks like one test is failing: https://circleci.com/gh/Featuretools/featuretools/1418. the error is |
@@ -61,9 +62,9 @@ def test_delta_with_observations(es): | |||
large_delta = Timedelta(99999, 'observations', 'log')('customers', | |||
instance_id=0, | |||
entityset=es) | |||
with pytest.raises(NotEnoughData): | |||
with pytest.raises(NotEnoughData, match=''): |
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.
no need to have match text here. In this case NotEnoughData
is already specific enough
34fa316
to
dc6222a
Compare
Thanks @kmax12. I updated the commit. Let me know if anything else needs to be changed. |
@jeff-hernandez looks like python 2.7 tests are failing because |
Codecov Report
@@ Coverage Diff @@
## master #303 +/- ##
==========================================
+ Coverage 95.03% 95.06% +0.02%
==========================================
Files 71 71
Lines 7620 7660 +40
==========================================
+ Hits 7242 7282 +40
Misses 378 378
Continue to review full report at Codecov.
|
fca7ada
to
fe5c50c
Compare
I switched back to the previous snippet: df = pd.read_csv(filenames[entity], encoding='utf-8') I still get the error for reading a file with accents in the file path. I couldn't get the error text to work in the function |
does the following work for error_text = u'Unable to add relationship because id in régions is Pandas dtype object and session_id in log2 is Pandas dtype int64.'
with pytest.raises(ValueError, match=error_text):
mismatch = Relationship(entityset[u'régions']['id'], entityset['log2']['session_id'])
entityset.add_relationship(mismatch) other than that, it's good to merge! |
00a3898
to
43e3629
Compare
@kmax12 I tried the code snippet. This is the error I get for python 2.7:
|
@jeff-hernandez im looking into this now. weirdly it's only a problem in python 2.7. |
actually, here's an easier fix. let's just change the entity for this test case. I think that this solution is fine since we aren't trying to test unicode stuff with this test case. So, it can just be error_text = u'Unable to add relationship because id in customers is Pandas dtype category and session_id in log2 is Pandas dtype int64.'
with pytest.raises(ValueError, match=error_text):
mismatch = Relationship(entityset[u'customers']['id'], entityset['log2']['session_id'])
entityset.add_relationship(mismatch) |
416eb5b
to
0992f03
Compare
Okay sounds good. I made the adjustment. |
0897180
to
4aa02e5
Compare
No problem. I updated the adjustment. Let me know if anything else needs modification. Thanks. |
Looks good. Merging. Thanks for the contribution! |
régions.csv
). So, I resolved it with the following:np.dtype((np.integer, np.floating)).type
was causing this issue. So, I resolved it by changing it to the following:test_not_enough_memory