Skip to content

Commit

Permalink
Windows fix to test_evaluators.
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelClerx committed Jul 24, 2018
1 parent 126c089 commit 0571beb
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions pints/tests/test_evaluators.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ def test_sequential(self):
self.assertRaises(ValueError, e.evaluate, 1)

# Test args
e = pints.SequentialEvaluator(f_args, [10, 20, self])
e.evaluate([1])
e = pints.SequentialEvaluator(f_args, [10, 20])
self.assertEqual(e.evaluate([1]), [31])

# Args must be a sequence
self.assertRaises(ValueError, pints.SequentialEvaluator, f_args, 1)
Expand All @@ -79,8 +79,8 @@ def test_parallel(self):
self.assertRaises(ValueError, e.evaluate, 1)

# Test args
e = pints.ParallelEvaluator(f_args, args=[10, 20, self])
e.evaluate([1])
e = pints.SequentialEvaluator(f_args, [10, 20])
self.assertEqual(e.evaluate([1]), [31])

# Args must be a sequence
self.assertRaises(ValueError, pints.ParallelEvaluator, f_args, args=1)
Expand Down Expand Up @@ -174,9 +174,8 @@ def f(x):
return x ** 2


def f_args(x, y, z, testcase):
testcase.assertEqual(y, 10)
testcase.assertEqual(z, 20)
def f_args(x, y, z):
return x + y + z


def ioerror_on_five(x):
Expand Down

0 comments on commit 0571beb

Please sign in to comment.