Skip to content

Commit dce7e2d

Browse files
committed
fix tests file
1 parent c6a5747 commit dce7e2d

File tree

1 file changed

+4
-31
lines changed

1 file changed

+4
-31
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,32 @@
1-
<<<<<<< HEAD
21
import os
3-
=======
42
import bson
53
import gzip
6-
74
from pathlib import Path
8-
>>>>>>> 45fcce62 (Tidy polarization tests)
95

106
from atomate.utils.testing import AtomateTest
117
from atomate.vasp.firetasks.parse_outputs import PolarizationToDb
128

139
__author__ = "Tess Smidt"
1410
__email__ = "[email protected]"
1511

16-
<<<<<<< HEAD
17-
module_dir = os.path.dirname(os.path.abspath(__file__))
18-
db_dir = os.path.join(module_dir, "..", "..", "..", "common", "test_files")
19-
ref_dir = os.path.join(module_dir, "..", "..", "test_files")
12+
module_dir = Path(__file__).resolve().parent
13+
db_dir = module_dir / "../../../common/test_files"
14+
ref_dir = module_dir / "../../test_files"
2015

2116

2217
DEBUG_MODE = (
2318
True # If true, retains the database and output dirs at the end of the test
2419
)
2520
# If None, runs a "fake" VASP. Otherwise, runs VASP with this command...
2621
VASP_CMD = None
27-
=======
28-
module_dir = Path(__file__).resolve().parent
29-
db_dir = module_dir / "../../../common/test_files"
30-
<<<<<<< HEAD
31-
ref_dir = module_dir / "../..//test_files"
32-
>>>>>>> 45fcce62 (Tidy polarization tests)
33-
=======
34-
ref_dir = module_dir / "../../test_files"
35-
>>>>>>> fcdf2e63 (Finish tidying polarization tests)
22+
3623

3724

3825
class TestPolarizationFiretasks(AtomateTest):
3926
def test_polarizationtodb(self):
40-
<<<<<<< HEAD
41-
import gzip
42-
43-
import bson
44-
45-
reference_dir = os.path.abspath(os.path.join(ref_dir, "ferroelectric_wf"))
46-
47-
with gzip.open(os.path.join(reference_dir, "tasks.bson.gz")) as f:
48-
=======
4927
wf_dir = ref_dir / "ferroelectric_wf"
5028

5129
with gzip.open(wf_dir / "tasks.bson.gz") as f:
52-
>>>>>>> 45fcce62 (Tidy polarization tests)
5330
coll_raw = f.read()
5431

5532
coll = bson.decode_all(coll_raw)
@@ -69,8 +46,4 @@ def test_polarizationtodb(self):
6946
# Check recovered change in polarization
7047
coll = self.get_task_collection("polarization_tasks")
7148
d = coll.find_one()
72-
<<<<<<< HEAD
73-
self.assertAlmostEqual(d["polarization_change_norm"], 46.288752795325244, 5)
74-
=======
7549
self.assertAlmostEqual(d["polarization_change_norm"], 46.28875279532, 5)
76-
>>>>>>> 45fcce62 (Tidy polarization tests)

0 commit comments

Comments
 (0)