-
Notifications
You must be signed in to change notification settings - Fork 280
Closed
Labels
backlogIssues to address with priority for current development goalsIssues to address with priority for current development goalsdiscussionDiscussions related to the design, implementation and operation of the projectDiscussions related to the design, implementation and operation of the projecttesting
Milestone
Description
Description of issue or feature request:
Currently our code style guidelines doesn't specify anything about the usage of self.assertRaises
vs the usage of with self.assertRaises():
Using self.assertRaises
can lead to long statements separated to multiline expressions as pointed out by @jku here: #1658 (comment).
On another hand with self.assertRaises():
looks better in my opinion:
Line 131 in 589ed9e
with self.assertRaises(DeserializationError): |
Long expressions look a lot better
Line 210 in 589ed9e
with self.assertRaises(exceptions.UnsignedMetadataError): |
with self.assertRaises():
than using self.assertRaises():
as pointed out in Jussi's comment.
Current behavior:
No guidelines about self.assertRaises
vs with self.assertRaises():
.
Expected behavior:
The question is should we specify something more concrete?
EDIT: We decided we would remove all instances of self.assertRaises
and replace them with with self.assertRaises
.
Metadata
Metadata
Assignees
Labels
backlogIssues to address with priority for current development goalsIssues to address with priority for current development goalsdiscussionDiscussions related to the design, implementation and operation of the projectDiscussions related to the design, implementation and operation of the projecttesting