Skip to content

Commit

Permalink
Moved tests into package
Browse files Browse the repository at this point in the history
  • Loading branch information
LaurentRDC committed Dec 14, 2020
1 parent 6ba370b commit 3da2f99
Show file tree
Hide file tree
Showing 14 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ include requirements.txt
include dev-requirements.txt

recursive-include crystals/cifs *.cif
recursive-include tests *
recursive-include crystals/tests/data *

recursive-exclude docs *

global-exclude *.py[cod] __pycache__ *.so *.dylib
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
8 changes: 4 additions & 4 deletions tests/test_parsers.py → crystals/tests/test_parsers.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ def test_vo2(self):

def test_site_occupancy(self):
""" Test that atom site occupancy is correctly parsed from CIF files. """
path = os.path.join("tests", "data", "SiC_partial_site_occ.cif")
path = Path(__file__).parent / "data" / "SiC_partial_site_occ.cif"
with CIFParser(path) as parser:
atoms = list(parser.atoms())

Expand Down Expand Up @@ -278,11 +278,11 @@ def test_material_id(self):
class TestPWSCFParser(unittest.TestCase):
def setUp(self):
self.parser_tise2 = PWSCFParser(
Path(".") / "tests" / "data" / "pwscf_tise2.out"
Path(__file__).parent / "data" / "pwscf_tise2.out"
)
self.parser_snse = PWSCFParser(Path(".") / "tests" / "data" / "pwscf_snse.out")
self.parser_snse = PWSCFParser(Path(__file__).parent / "data" / "pwscf_snse.out")
self.parser_graphite = PWSCFParser(
Path(".") / "tests" / "data" / "pwscf_graphite.out"
Path(__file__).parent / "data" / "pwscf_graphite.out"
)

def test_alat(self):
Expand Down
File renamed without changes.
File renamed without changes.

0 comments on commit 3da2f99

Please sign in to comment.