tests: tests cleaned up, name duplicate in obs_test corrected

This commit is contained in:
Fabian Joswig 2022-02-09 11:23:58 +00:00
parent df17f676fd
commit 080e09a07f
3 changed files with 13 additions and 17 deletions

View file

@ -1,7 +1,6 @@
import numpy as np
import pyerrors as pe
import pytest
import time
np.random.seed(0)

View file

@ -1,7 +1,5 @@
import autograd.numpy as np
import os
import random
import string
import copy
import pyerrors as pe
import pytest
@ -142,7 +140,7 @@ def test_overloading_vectorization():
assert [o.value for o in b / a] == [o.value for o in [b / p for p in a]]
def test_gamma_method():
def test_gamma_method_standard_data():
for data in [np.tile([1, -1], 1000),
np.random.rand(100001),
np.zeros(1195),
@ -285,7 +283,7 @@ def test_covariance_symmetry():
assert np.abs(cov_ab) < test_obs1.dvalue * test_obs2.dvalue * (1 + 10 * np.finfo(np.float64).eps)
def test_gamma_method():
def test_gamma_method_uncorrelated():
# Construct pseudo Obs with random shape
value = np.random.normal(5, 10)
dvalue = np.abs(np.random.normal(0, 1))

View file

@ -1,14 +1,14 @@
import os,sys,inspect
import os
import sys
import inspect
import pyerrors as pe
import pyerrors.input.sfcf as sfin
import shutil
current_dir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))
parent_dir = os.path.dirname(current_dir)
sys.path.insert(0, parent_dir)
import pyerrors as pe
import pyerrors.input.openQCD as qcdin
import pyerrors.input.sfcf as sfin
import shutil
from time import sleep
def build_test_environment(env_type, cfgs, reps):
if env_type == "o":
@ -26,7 +26,6 @@ def build_test_environment(env_type, cfgs, reps):
def clean_test_environment(env_type, cfgs, reps):
if env_type == "o":
for i in range(1,reps):