Skip to content

Commit

Permalink
Code style
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexandreDecan committed Jan 29, 2016
1 parent 18509a0 commit 7e78f64
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/test_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ def test_rotate_source(self):
self.sc.validate()

def test_rotate_target(self):
tr = list(filter(lambda t: t.source == 's1', self.sc.transitions))[0]
tr = next(t for t in self.sc.transitions if t.source == 's1')
self.sc.rotate_transition(tr, new_target='s2')
self.assertEqual(tr.target, 's2')

Expand All @@ -228,15 +228,15 @@ def test_rotate_target(self):
self.sc.validate()

def test_rotate_both(self):
tr = list(filter(lambda t: t.source == 's1', self.sc.transitions))[0]
tr = next(t for t in self.sc.transitions if t.source == 's1')

self.sc.rotate_transition(tr, new_source='s1', new_target='s2')
self.assertEqual(tr.source, 's1')
self.assertEqual(tr.target, 's2')
self.sc.validate()

def test_rotate_both_unexisting(self):
tr = list(filter(lambda t: t.source == 's1', self.sc.transitions))[0]
tr = next(t for t in self.sc.transitions if t.source == 's1')

with self.assertRaises(ValueError):
self.sc.rotate_transition(tr)
Expand All @@ -249,7 +249,7 @@ def test_rotate_both_unexisting(self):
self.sc.validate()

def test_rotate_both_with_internal(self):
tr = list(filter(lambda t: t.source == 's1', self.sc.transitions))[0]
tr = next(t for t in self.sc.transitions if t.source == 's1')

self.sc.rotate_transition(tr, new_source='s1', new_target=None)
self.assertEqual(tr.source, 's1')
Expand Down

0 comments on commit 7e78f64

Please sign in to comment.