Skip to content

Commit

Permalink
Fix file paths in test files
Browse files Browse the repository at this point in the history
  • Loading branch information
wladerer committed Nov 27, 2023
1 parent 905aec7 commit 170b98d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion test/test_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from vsh.scripts.analysis import *

def test_check_convergence():
assert check_convergence(file='files/vasprun.xml') == [True, True]
assert check_convergence(file='test/files/vasprun.xml') == [True, True]



Expand Down
4 changes: 2 additions & 2 deletions test/test_slab.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
from pymatgen.core.structure import Structure

def test_structure_from_file():
expected_structure = Structure.from_file('files/POSCAR')
actual_structure = structure_from_file('files/POSCAR')
expected_structure = Structure.from_file('test/files/POSCAR')
actual_structure = structure_from_file('test/files/POSCAR')
assert expected_structure == actual_structure

if __name__ == '__main__':
Expand Down
6 changes: 3 additions & 3 deletions test/test_vshband.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

def test_handle_atoms():
# read the test file
atom_indices = handle_atoms('files/wp2CO.vasp')
atom_indices = handle_atoms('test/files/wp2CO.vasp')

# check if the atom types and counts match the expected values
assert len(atom_indices) == 4
Expand All @@ -15,7 +15,7 @@ def test_handle_atoms():
assert atom_indices['O'] == [73]

# test with a different file
atom_indices = handle_atoms('files/Cu2O.vasp')
atom_indices = handle_atoms('test/files/Cu2O.vasp')

# check if the atom types and counts match the expected values
assert len(atom_indices) == 2
Expand Down Expand Up @@ -52,4 +52,4 @@ def test_handle_orbitals():

if __name__ == '__main__':
test_handle_atoms()
test_handle_orbitals()
test_handle_orbitals()

0 comments on commit 170b98d

Please sign in to comment.