-
Notifications
You must be signed in to change notification settings - Fork 402
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into ssim_kernel_order
- Loading branch information
Showing
5 changed files
with
33 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import pytest | ||
|
||
from tests.helpers.testers import DummyListMetric, DummyMetric | ||
|
||
|
||
@pytest.mark.parametrize( | ||
"metric_cls", | ||
[ | ||
DummyMetric, | ||
DummyListMetric, | ||
], | ||
) | ||
def test_metric_hashing(metric_cls): | ||
"""Tests that hases are different. | ||
See the Metric's hash function for details on why this is required. | ||
""" | ||
instance_1 = metric_cls() | ||
instance_2 = metric_cls() | ||
|
||
assert hash(instance_1) != hash(instance_2) | ||
assert id(instance_1) != id(instance_2) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters