Skip to content

Commit 92a9266

Browse files
pre-commit-ci[bot]njzjz-bot
authored andcommitted
fix: update helper imports after format move
1 parent 12352bc commit 92a9266

3 files changed

Lines changed: 6 additions & 9 deletions

File tree

tests/test_cell_to_low_triangle.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import unittest
44

55
import numpy as np
6+
67
from dpdata.formats.cp2k.cell import cell_to_low_triangle
78

89

@@ -45,16 +46,12 @@ def test_func3(self):
4546

4647
def test_func4(self):
4748
with self.assertRaises(Exception) as c:
48-
cell_to_low_triangle(
49-
0.1, 6, 6, np.pi * 1 / 2, np.pi * 1 / 2, np.pi * 1 / 2
50-
)
49+
cell_to_low_triangle(0.1, 6, 6, np.pi * 1 / 2, np.pi * 1 / 2, np.pi * 1 / 2)
5150
self.assertTrue("A==0.1" in str(c.exception))
5251

5352
def test_func5(self):
5453
with self.assertRaises(Exception) as c:
55-
cell_to_low_triangle(
56-
6, 6, 6, np.pi * 3 / 180, np.pi * 1 / 2, np.pi * 1 / 2
57-
)
54+
cell_to_low_triangle(6, 6, 6, np.pi * 3 / 180, np.pi * 1 / 2, np.pi * 1 / 2)
5855
self.assertTrue("alpha" in str(c.exception))
5956

6057
def test_func6(self):

tests/test_gaussian_driver.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import numpy as np
99
from comp_sys import CompSys, IsNoPBC
1010
from context import dpdata
11+
1112
from dpdata.formats.gaussian.gjf import detect_multiplicity
1213

1314

@@ -84,9 +85,7 @@ def test_detect_multiplicity(self):
8485
self._check_multiplicity(["C", "H"], 2)
8586

8687
def _check_multiplicity(self, symbols, multiplicity):
87-
self.assertEqual(
88-
detect_multiplicity(np.array(symbols)), multiplicity
89-
)
88+
self.assertEqual(detect_multiplicity(np.array(symbols)), multiplicity)
9089

9190
def tearDown(self):
9291
if os.path.exists("gaussian/tmp.gjf"):

tests/test_qe_cp_traj.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
import numpy as np
66
from context import dpdata
7+
78
from dpdata.formats.qe.traj import convert_celldm
89

910
bohr2ang = dpdata.unit.LengthConversion("bohr", "angstrom").value()

0 commit comments

Comments
 (0)