Skip to content
Snippets Groups Projects
Commit 7e82dd46 authored by Nathan Daelman's avatar Nathan Daelman
Browse files

Set libxc root rather than libxc src

parent d3ffaa5c
No related branches found
No related tags found
No related merge requests found
......@@ -4,5 +4,4 @@ neo4j:
host: 'localhost'
port: 7687
libxc:
src: '/home/nathan/Documents/libxc/src/'
xc-info: '/home/nathan/Documents/libxc/bin/'
path: '/home/nathan/Documents/libxc/'
import pytest
import yaml
from maple_parser import find_comment, find_file_reference, find_formula
from maple_parser import find_comments, find_file_references, find_formulas
# Read the YAML file
with open("config.yaml", "r") as file:
config = yaml.safe_load(file)
file.close()
libxc_src = config["libxc"]["src"]
libxc_src = config["libxc"]["path"]
@pytest.fixture
def gga_k_apbe():
with open(f"{libxc_src}/../maple/gga_exc/gga_k_apbe.mpl", "r") as file:
with open(f"{libxc_src}/maple/gga_exc/gga_k_apbe.mpl", "r") as file:
contents = [line.strip("\n") for line in file.readlines()]
file.close()
return contents
def test_comment(gga_k_apbe):
_, comment_line = find_comment([gga_k_apbe[8]])
_, comment_line = find_comments([gga_k_apbe[8]])
assert comment_line[0] == "(* type: gga_exc *)"
_, comment_block = find_comment(gga_k_apbe[9:17])
_, comment_block = find_comments(gga_k_apbe[9:17])
assert len(comment_block) == 6
assert comment_block[0] == "(* prefix:"
assert comment_block[-1] == "*)"
def test_parse_reference(gga_k_apbe):
_, file_reference = find_file_reference([gga_k_apbe[16]])
assert file_reference[0] == '$include "gga_x_pbe.mpl"'
_, file_reference = find_file_references([gga_k_apbe[16]])
assert file_reference[0] == "gga_x_pbe.mpl"
def test_parse_formula(gga_k_apbe):
_, formula = find_formula([gga_k_apbe[18]])
_, formula = find_formulas([gga_k_apbe[18]])
assert (
formula[0] == "f := (rs, z, xt, xs0, xs1) -> gga_kinetic(pbe_f, rs, z, xs0, xs1):"
)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment