Skip to content

Commit

Permalink
test: update testing cases for pypots.utils.random;
Browse files Browse the repository at this point in the history
  • Loading branch information
WenjieDu committed May 24, 2024
1 parent a405502 commit 4c91df4
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/utils/random.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import torch

from pypots.utils.random import set_random_seed, get_random_seed
from pypots.utils.random import RANDOM_SEED as default_random_seed


class TestRandom(unittest.TestCase):
Expand All @@ -33,8 +34,9 @@ def test_set_random_seed(self):

current_seed = get_random_seed()
assert (
not current_seed == 32
), "The random seed has been set to 26, not equal to 32."
not current_seed == default_random_seed
), f"The random seed has been set to {current_seed} not equal to the default seed {default_random_seed}."

set_random_seed(32)
current_seed = get_random_seed()
assert (
Expand Down

0 comments on commit 4c91df4

Please sign in to comment.