Skip to content

Commit

Permalink
Fixed test path
Browse files Browse the repository at this point in the history
  • Loading branch information
charnley committed Feb 9, 2024
1 parent 72def0b commit 320c524
Showing 1 changed file with 7 additions and 15 deletions.
22 changes: 7 additions & 15 deletions tests/test_solvers.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
import os
from copy import deepcopy

import numpy as np
from conftest import ASSETS

from qmllib.solvers import bkf_invert, bkf_solve, cho_invert, cho_solve


def test_cho_solve():

test_dir = os.path.dirname(os.path.realpath(__file__))

A_ref = np.loadtxt(test_dir + "/data/K_local_gaussian.txt")
y_ref = np.loadtxt(test_dir + "/data/y_cho_solve.txt")
A_ref = np.loadtxt(ASSETS / "K_local_gaussian.txt")
y_ref = np.loadtxt(ASSETS / "y_cho_solve.txt")

A = deepcopy(A_ref)
y = deepcopy(y_ref)
Expand All @@ -30,9 +28,7 @@ def test_cho_solve():

def test_cho_invert():

test_dir = os.path.dirname(os.path.realpath(__file__))

A_ref = np.loadtxt(test_dir + "/data/K_local_gaussian.txt")
A_ref = np.loadtxt(ASSETS / "K_local_gaussian.txt")

A = deepcopy(A_ref)
Ai_qml = cho_invert(A)
Expand All @@ -49,9 +45,7 @@ def test_cho_invert():

def test_bkf_invert():

test_dir = os.path.dirname(os.path.realpath(__file__))

A_ref = np.loadtxt(test_dir + "/data/K_local_gaussian.txt")
A_ref = np.loadtxt(ASSETS / "K_local_gaussian.txt")

A = deepcopy(A_ref)
Ai_qml = bkf_invert(A)
Expand All @@ -68,10 +62,8 @@ def test_bkf_invert():

def test_bkf_solve():

test_dir = os.path.dirname(os.path.realpath(__file__))

A_ref = np.loadtxt(test_dir + "/data/K_local_gaussian.txt")
y_ref = np.loadtxt(test_dir + "/data/y_cho_solve.txt")
A_ref = np.loadtxt(ASSETS / "K_local_gaussian.txt")
y_ref = np.loadtxt(ASSETS / "y_cho_solve.txt")

A = deepcopy(A_ref)
y = deepcopy(y_ref)
Expand Down

0 comments on commit 320c524

Please sign in to comment.