mirror of
https://github.com/fjosw/pyerrors.git
synced 2025-06-29 08:19:27 +02:00
fixed seed added to tests
This commit is contained in:
parent
1b63f5dd3b
commit
bb9790acd7
4 changed files with 12 additions and 1 deletions
|
@ -2,7 +2,9 @@ import numpy as np
|
|||
import pyerrors as pe
|
||||
import pytest
|
||||
|
||||
def test_find_root():
|
||||
np.random.seed(0)
|
||||
|
||||
def test_root_linear():
|
||||
|
||||
def root_function(x, d):
|
||||
return x - d
|
||||
|
@ -12,3 +14,6 @@ def test_find_root():
|
|||
my_root = pe.roots.find_root(my_obs, root_function)
|
||||
|
||||
assert np.isclose(my_root.value, value)
|
||||
difference = my_obs - my_root
|
||||
assert all(np.isclose(0.0, difference.deltas['t']))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue