Skip to content

Commit

Permalink
fix(tests): fix skip_dp (deepmodeling#4111)
Browse files Browse the repository at this point in the history
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **Bug Fixes**
- Updated the test skipping logic across multiple test files to
reference the correct condition for skipping tests, enhancing the
accuracy of test execution.
- **Tests**
- Adjusted the `skip_dp` method in various test classes to improve the
control flow and alignment with specific testing scenarios.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Signed-off-by: Jinzhe Zeng <[email protected]>
  • Loading branch information
njzjz authored Sep 9, 2024
1 parent c3ba728 commit c81ce16
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion source/tests/consistent/descriptor/test_dpa1.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ def skip_dp(self) -> bool:
use_econf_tebd,
use_tebd_bias,
) = self.param
return CommonTest.skip_pt or self.is_meaningless_zero_attention_layer_tests(
return CommonTest.skip_dp or self.is_meaningless_zero_attention_layer_tests(
attn_layer,
attn_dotr,
normalize,
Expand Down
2 changes: 1 addition & 1 deletion source/tests/consistent/descriptor/test_dpa2.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ def skip_dp(self) -> bool:
use_econf_tebd,
use_tebd_bias,
) = self.param
return CommonTest.skip_pt
return CommonTest.skip_dp

@property
def skip_tf(self) -> bool:
Expand Down
2 changes: 1 addition & 1 deletion source/tests/consistent/descriptor/test_se_atten_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ def skip_dp(self) -> bool:
use_econf_tebd,
use_tebd_bias,
) = self.param
return CommonTest.skip_pt or self.is_meaningless_zero_attention_layer_tests(
return CommonTest.skip_dp or self.is_meaningless_zero_attention_layer_tests(
attn_layer,
attn_dotr,
normalize,
Expand Down
2 changes: 1 addition & 1 deletion source/tests/consistent/descriptor/test_se_t_tebd.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ def skip_dp(self) -> bool:
use_econf_tebd,
use_tebd_bias,
) = self.param
return CommonTest.skip_pt
return CommonTest.skip_dp

@property
def skip_tf(self) -> bool:
Expand Down

0 comments on commit c81ce16

Please sign in to comment.