Esempio n. 1
0
 def test_get_interval(self):
     config = ChecksConfig()
     assert config.get_interval(1) == 1
     assert config.get_interval(-1) == -1
     assert config.get_interval(-2) == -2
     assert config.get_interval() == ChecksConfig.INTERVAL
     os.environ[POLYAXON_KEYS_INTERVALS_COMPATIBILITY_CHECK] = "-1"
     assert config.get_interval() == -1
     os.environ[POLYAXON_KEYS_INTERVALS_COMPATIBILITY_CHECK] = "-2"
     assert config.get_interval() == ChecksConfig.INTERVAL
     os.environ[POLYAXON_KEYS_INTERVALS_COMPATIBILITY_CHECK] = "1"
     assert config.get_interval() == ChecksConfig.INTERVAL
     os.environ[POLYAXON_KEYS_INTERVALS_COMPATIBILITY_CHECK] = str(
         ChecksConfig.INTERVAL + 1)
     assert config.get_interval() == ChecksConfig.INTERVAL + 1
Esempio n. 2
0
 def test_get_interval(self):
     config = ChecksConfig()
     assert config.get_interval(1) == 1
     assert config.get_interval() == ChecksConfig.INTERVAL