コード例 #1
0
 def test_set_random_seed_from_string(self) -> None:
     """Test setting random_seed from string in Tuning config."""
     tuning = Tuning()
     tuning.set_random_seed("123456")
     self.assertEqual(tuning.random_seed, 123456)
コード例 #2
0
 def test_set_random_seed_invalid_string(self) -> None:
     """Test setting random_seed from invalid string in Tuning config."""
     tuning = Tuning()
     with self.assertRaises(ClientErrorException):
         tuning.set_random_seed("abc")
コード例 #3
0
 def test_set_random_seed(self) -> None:
     """Test setting random_seed in Tuning config."""
     tuning = Tuning()
     tuning.set_random_seed(123456)
     self.assertEqual(tuning.random_seed, 123456)