Skip to content

Commit

Permalink
fix UT issues: can be run in the tests folder and remove temp file (#130
Browse files Browse the repository at this point in the history
)

- the UTs can be run in the `tests` folder.
- remove a temp folder.

---------

Co-authored-by: Han Wang <wang_han@iapcm.ac.cn>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
3 people committed Feb 7, 2023
1 parent d7aa3aa commit 21cd921
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 18 deletions.
6 changes: 3 additions & 3 deletions tests/exploration/test_conf_filter.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@

import dpdata
import numpy as np
from fake_data_set import (
fake_system,
)
from mock import (
patch,
)
Expand All @@ -12,9 +15,6 @@
ConfFilters,
)

from ..fake_data_set import (
fake_system,
)
from .context import (
dpgen2,
)
Expand Down
8 changes: 4 additions & 4 deletions tests/fp/test_prep_vasp.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@
OPIOSign,
TransientError,
)
from fake_data_set import (
fake_multi_sys,
fake_system,
)

from dpgen2.constants import (
fp_task_pattern,
Expand All @@ -35,10 +39,6 @@
dump_object_to_file,
)

from ..fake_data_set import (
fake_multi_sys,
fake_system,
)
from .context import (
dpgen2,
)
Expand Down
9 changes: 4 additions & 5 deletions tests/op/test_collect_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@
OPIOSign,
TransientError,
)
from fake_data_set import (
fake_multi_sys,
fake_system,
)
from mock import (
call,
mock,
Expand All @@ -34,11 +38,6 @@
CollectData,
)

from ..fake_data_set import (
fake_multi_sys,
fake_system,
)


class TestRunLmp(unittest.TestCase):
def setUp(self):
Expand Down
9 changes: 4 additions & 5 deletions tests/op/test_run_dp_train.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@
OPIOSign,
TransientError,
)
from fake_data_set import (
fake_multi_sys,
fake_system,
)
from mock import (
call,
patch,
Expand All @@ -31,11 +35,6 @@
RunDPTrain,
)

from ..fake_data_set import (
fake_multi_sys,
fake_system,
)


class TestRunDPTrain(unittest.TestCase):
def setUp(self):
Expand Down
2 changes: 1 addition & 1 deletion tests/test_prep_run_dp_labeling.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def tearDown(self):

shutil.rmtree(deepmd_input_path, ignore_errors=True)

shutil.rmtree(deepmd_teacher_model, ignore_errors=True)
shutil.rmtree(deepmd_temp_path, ignore_errors=True)

shutil.rmtree(deepmd_teacher_model, ignore_errors=True)

Expand Down

0 comments on commit 21cd921

Please sign in to comment.