-
Notifications
You must be signed in to change notification settings - Fork 10
Line scale()/scale_ip()
#170
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
Line scale()/scale_ip()
#170
Conversation
You have to add the new functions to geometry.rst as well |
with self.assertRaises(ValueError): | ||
line.scale_ip(0, 0.5) | ||
|
||
with self.assertRaises(ValueError): | ||
line.scale_ip(2, -0.1) | ||
|
||
with self.assertRaises(ValueError): | ||
line.scale_ip(-2, -0.5) | ||
|
||
with self.assertRaises(ValueError): | ||
line.scale_ip(17, 1.1) | ||
|
||
with self.assertRaises(ValueError): | ||
line.scale_ip(17, 10.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.
you could put these in a single for loop
|
||
with self.assertRaises(ValueError): | ||
line.scale_ip(17, 10.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.
You should also add tests for invalid argument type, here you just have invalid values, (scroll up and you'll find similar tests for argument types)
Closes #145