Conversation
Pull Request Test Coverage Report for Build 176
💛 - Coveralls |
sushain97
left a comment
There was a problem hiding this comment.
Looks like you're almost there. Do you mind adding a few tests?
README.md
Outdated
|
|
||
| ### Translation | ||
| Performing Translations | ||
| <<<<<<< HEAD |
There was a problem hiding this comment.
@sushain97 No worries, I'll add tests :)
tests/__init__.py
Outdated
|
|
||
| def test_repr(self): | ||
| generator = apertium.Generator('eng') | ||
| self.assertEqual(repr(generator), 'Generator(lang=eng)') |
There was a problem hiding this comment.
These need single quotes. Generator(lang=eng) itself would error. Similar concern with the others.
There was a problem hiding this comment.
@sushain97 Just to check if I understand this properly,
The issue is that 'Generator(lang=eng)' is being returned by the function as a string?
But wasn't that the point of repr, it returns a printable representation of the object
|
No, the problem is eng should be enclosed in single quotes.
…On Tue, Jul 10, 2018, 6:49 AM Arghya Bhatttacharya ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In tests/__init__.py
<#27 (comment)>
:
> @@ -68,6 +75,14 @@ def test_uninstalled_mode(self):
with self.assertRaises(apertium.ModeNotInstalled):
apertium.generate('spa', 'cat<n><pl>')
+ def test_repr(self):
+ generator = apertium.Generator('eng')
+ self.assertEqual(repr(generator), 'Generator(lang=eng)')
@sushain97 <https://github.com/sushain97> Just to check if I understand
this properly,
The issue is that 'Generator(lang=eng)' is being returned by the function
as a string?
But wasn't that the point of repr, it returns a printable representation
of the object
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#27 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AEBEfvUePK18Kbz6uwG4c-qNzl9xpr0-ks5uFLD1gaJpZM4VGqra>
.
|
|
@sushain97 But why? I don't quite understand what the problem with the current repr and str function is Sorry for the inconvenience 😅 |
|
@sushain97 I've changed the code according to my understanding, please review and let me know if I have it right. |
The issue is that |
|
The |
@sushain97 Could you review this ?