diff --git a/tests/test_bop.py b/tests/test_bop.py
index e13dea53..896584b2 100644
--- a/tests/test_bop.py
+++ b/tests/test_bop.py
@@ -20,6 +20,8 @@
# along with this program. If not, see .
#
+import os.path
+
import numpy as np
import pytest
@@ -71,7 +73,7 @@ def test_stress(a0, par):
def test_hessian_divide_by_masses():
# Test the computation of dynamical matrix
- atoms = ase.io.read('aSi.cfg')
+ atoms = ase.io.read(f'{os.path.dirname(__file__)}/aSi.cfg')
masses_n = np.random.randint(1, 10, size=len(atoms))
atoms.set_masses(masses=masses_n)
kumagai_potential = kumagai.Kumagai_Comp_Mat_Sci_39_Si
diff --git a/tests/test_neighbours.py b/tests/test_neighbours.py
index a4510b86..b8b354d8 100644
--- a/tests/test_neighbours.py
+++ b/tests/test_neighbours.py
@@ -41,6 +41,7 @@
# along with this program. If not, see .
# ======================================================================
+import os.path
import unittest
import numpy as np
@@ -70,7 +71,7 @@ class TestNeighbours(matscipytest.MatSciPyTestCase):
def test_neighbour_list(self):
for pbc in [True, False, [True, False, True]]:
- a = io.read('aC.cfg')
+ a = io.read(f'{os.path.dirname(__file__)}/aC.cfg')
a.set_pbc(pbc)
j, dr, i, abs_dr, shift = neighbour_list("jDidS", a, 1.85)
@@ -90,7 +91,7 @@ def test_neighbour_list(self):
def test_neighbour_list_atoms_outside_box(self):
for pbc in [True, False, [True, False, True]]:
- a = io.read('aC.cfg')
+ a = io.read(f'{os.path.dirname(__file__)}/aC.cfg')
a.set_pbc(pbc)
a.positions[100, :] += a.cell[0, :]
a.positions[200, :] += a.cell[1, :]
@@ -243,7 +244,7 @@ def test_wrong_number_of_cutoffs(self):
self.assertTrue(exception_thrown)
def test_shrink_wrapped_direct_call(self):
- a = io.read('aC.cfg')
+ a = io.read(f'{os.path.dirname(__file__)}/aC.cfg')
r = a.positions
j, dr, i, abs_dr, shift = neighbour_list("jDidS", positions=r,
cutoff=1.85)
diff --git a/tests/test_ring_statistics.py b/tests/test_ring_statistics.py
index e16c6895..699e23b6 100644
--- a/tests/test_ring_statistics.py
+++ b/tests/test_ring_statistics.py
@@ -40,6 +40,7 @@
# along with this program. If not, see .
# ======================================================================
+import os.path
import unittest
import numpy as np
@@ -102,7 +103,7 @@ def test_pbc(self):
self.assertEqual(len(r), 0)
def test_aC(self):
- a = ase.io.read('aC.cfg')
+ a = ase.io.read(f'{os.path.dirname(__file__)}/aC.cfg')
r = ring_statistics(a, 1.85, maxlength=16)
self.assertArrayAlmostEqual(r, [0,0,0,0,4,813,2678,1917,693,412,209,89,
21,3])