Skip to content

Commit

Permalink
fix(UT): rm extra tearDown in test_training.py (deepmodeling#3906)
Browse files Browse the repository at this point in the history
Fix deepmodeling#3901 .

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **Tests**
- Improved test reliability by updating cleanup logic in `test_dp_train`
and `test_trainable` methods.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
  • Loading branch information
iProzd authored Jun 25, 2024
1 parent ee4af27 commit 2f18f04
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions source/tests/pt/test_training.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,6 @@ def test_dp_train(self):
)
trainer_finetune_empty.run()

self.tearDown()

def test_trainable(self):
fix_params = deepcopy(self.config)
fix_params["model"]["descriptor"]["trainable"] = False
Expand Down Expand Up @@ -96,8 +94,6 @@ def test_trainable(self):
model_dict_before_training[key], model_dict_after_training[key]
)

self.tearDown()

def tearDown(self):
for f in os.listdir("."):
if f.startswith("model") and f.endswith(".pt"):
Expand Down

0 comments on commit 2f18f04

Please sign in to comment.