Skip to content

Commit

Permalink
Add missing tests for #197.
Browse files Browse the repository at this point in the history
  • Loading branch information
onyxfish committed Aug 29, 2015
1 parent 3eee866 commit f504d17
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions tests/test_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,3 +142,25 @@ def test_ancestor_changed(self):

self.assertEqual(self.executed_stage1, 1)
self.assertEqual(self.executed_stage2, 2)

def test_same_function_twice_parallel(self):
analysis = Analysis(self.stage1, cache_dir=TEST_CACHE)
noop = analysis.then(self.stage_noop)
noop.then(self.stage2)
noop.then(self.stage2)

analysis.run()

self.assertEqual(self.executed_stage1, 1)
self.assertEqual(self.executed_stage2, 2)

def test_same_function_twice_sequence(self):
analysis = Analysis(self.stage1, cache_dir=TEST_CACHE)
analysis.then(self.stage2)
analysis.then(self.stage_noop)
analysis.then(self.stage2)

analysis.run()

self.assertEqual(self.executed_stage1, 1)
self.assertEqual(self.executed_stage2, 2)

0 comments on commit f504d17

Please sign in to comment.