diff --git a/tests/Phpml/Metric/AccuracyTest.php b/tests/Phpml/Metric/AccuracyTest.php index 13a255a..ef54002 100644 --- a/tests/Phpml/Metric/AccuracyTest.php +++ b/tests/Phpml/Metric/AccuracyTest.php @@ -50,6 +50,8 @@ class AccuracyTest extends \PHPUnit_Framework_TestCase $accuracy = Accuracy::score($dataset->getTestLabels(), $predicted); - $this->assertEquals(0.959, $accuracy, '', 0.01); + $expected = PHP_VERSION_ID >= 70100 ? 1 : 0.959; + + $this->assertEquals($expected, $accuracy, '', 0.01); } }