Skip to content

Commit 8e19bff

Browse files
pre-commit-ci[bot]ac147942@uni-stuttgart.de
authored andcommitted
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent c528916 commit 8e19bff

2 files changed

Lines changed: 10 additions & 7 deletions

File tree

ipsuite/configuration_generation/packmol.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
import ase.units
1010
import h5py
1111
import numpy as np
12-
import rdkit2ase
1312
import znh5md
1413
import zntrack
1514

@@ -71,7 +70,7 @@ def run(self):
7170
data = self.data
7271

7372
frames = [
74-
#rdkit2ase.pack(
73+
# rdkit2ase.pack(
7574
pack(
7675
data=data,
7776
counts=self.count,

test_pack.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
import pytest
2-
import numpy as np
3-
from unittest.mock import patch, MagicMock
4-
import ase
1+
from unittest.mock import MagicMock, patch
52

6-
from ipsuite import Packmol, MultiPackmol
3+
import ase
4+
import pytest
75

6+
from ipsuite import MultiPackmol, Packmol
87

98
# -----------------------------
109
# Helpers
1110
# -----------------------------
1211

12+
1313
def dummy_atoms():
1414
return ase.Atoms("H2")
1515

@@ -18,6 +18,7 @@ def dummy_atoms():
1818
# Basic init tests
1919
# -----------------------------
2020

21+
2122
def test_packmol_ratio_default():
2223
node = Packmol(
2324
data=[[dummy_atoms()]],
@@ -50,6 +51,7 @@ def test_packmol_data_count_mismatch():
5051
# Mutable default safety
5152
# -----------------------------
5253

54+
5355
def test_ratio_not_shared_between_instances():
5456
a = Packmol(
5557
data=[[dummy_atoms()]],
@@ -70,6 +72,7 @@ def test_ratio_not_shared_between_instances():
7072
# run() call test (mock pack)
7173
# -----------------------------
7274

75+
7376
@patch("ipsuite.pack.pack")
7477
@patch("ipsuite.pack.znh5md.IO")
7578
def test_packmol_run_calls_pack(mock_io, mock_pack):
@@ -94,6 +97,7 @@ def test_packmol_run_calls_pack(mock_io, mock_pack):
9497
# MultiPackmol inheritance test
9598
# -----------------------------
9699

100+
97101
@patch("ipsuite.pack.pack")
98102
@patch("ipsuite.pack.znh5md.IO")
99103
def test_multipackmol_multiple_configs(mock_io, mock_pack):

0 commit comments

Comments
 (0)