diff --git a/dpgen/auto_test/Gamma.py b/dpgen/auto_test/Gamma.py index 27b06fa07..9ac9032e2 100644 --- a/dpgen/auto_test/Gamma.py +++ b/dpgen/auto_test/Gamma.py @@ -472,12 +472,15 @@ def _compute_lower(self, output_file, all_tasks, all_res): ) miller_index = loadfn(os.path.join(ii, "miller.json")) - ptr_data += "%-25s %7.2f %7.3f %8.3f %8.3f\n" % ( # noqa: UP031 - str(miller_index) + "-" + structure_dir + ":", - int(ii[-4:]) / self.n_steps, - sfe, - epa, - equi_epa_slab, + ptr_data += ( + "%-25s %7.2f %7.3f %8.3f %8.3f\n" + % ( # noqa: UP031 + str(miller_index) + "-" + structure_dir + ":", + int(ii[-4:]) / self.n_steps, + sfe, + epa, + equi_epa_slab, + ) ) res_data[int(ii[-4:]) / self.n_steps] = [sfe, epa, equi_epa] diff --git a/dpgen/auto_test/Interstitial.py b/dpgen/auto_test/Interstitial.py index a18505caa..a4b06ae1c 100644 --- a/dpgen/auto_test/Interstitial.py +++ b/dpgen/auto_test/Interstitial.py @@ -283,7 +283,8 @@ def make_confs(self, path_to_work, path_to_equi, refine=False): os.chdir(cwd) output_task2 = os.path.join( - path_to_work, "task.%06d" % (len(dss) + 1) # noqa: UP031 + path_to_work, + "task.%06d" % (len(dss) + 1), # noqa: UP031 ) os.makedirs(output_task2, exist_ok=True) os.chdir(output_task2) @@ -305,7 +306,8 @@ def make_confs(self, path_to_work, path_to_equi, refine=False): os.chdir(cwd) output_task3 = os.path.join( - path_to_work, "task.%06d" % (len(dss) + 2) # noqa: UP031 + path_to_work, + "task.%06d" % (len(dss) + 2), # noqa: UP031 ) os.makedirs(output_task3, exist_ok=True) os.chdir(output_task3) @@ -346,7 +348,8 @@ def make_confs(self, path_to_work, path_to_equi, refine=False): replace_label = idx output_task4 = os.path.join( - path_to_work, "task.%06d" % (len(dss) + 3) # noqa: UP031 + path_to_work, + "task.%06d" % (len(dss) + 3), # noqa: UP031 ) os.makedirs(output_task4, exist_ok=True) os.chdir(output_task4) @@ -380,7 +383,8 @@ def make_confs(self, path_to_work, path_to_equi, refine=False): os.chdir(cwd) output_task5 = os.path.join( - path_to_work, "task.%06d" % (len(dss) + 4) # noqa: UP031 + path_to_work, + "task.%06d" % (len(dss) + 4), # noqa: UP031 ) os.makedirs(output_task5, exist_ok=True) os.chdir(output_task5) @@ -414,7 +418,8 @@ def make_confs(self, path_to_work, path_to_equi, refine=False): os.chdir(cwd) output_task6 = os.path.join( - path_to_work, "task.%06d" % (len(dss) + 5) # noqa: UP031 + path_to_work, + "task.%06d" % (len(dss) + 5), # noqa: UP031 ) os.makedirs(output_task6, exist_ok=True) os.chdir(output_task6) diff --git a/tests/generator/test_post_fp.py b/tests/generator/test_post_fp.py index 9641603bf..72251328d 100644 --- a/tests/generator/test_post_fp.py +++ b/tests/generator/test_post_fp.py @@ -263,6 +263,7 @@ def setUp(self): "iter.000000/02.fp/data.000", fmt="deepmd/raw" ) + class TestPostCP2K(unittest.TestCase, CompLabeledSys): def setUp(self): self.places = 5