/
githubmirror
/
cmssw
Обзор
Документация
Войти
/
githubmirror
/
cmssw
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
Configuration/DataProcessing/test/GetScenario_t.py
36 строк
753 B
David
move to python3
06 июл 2021, 16:18
06 июл 2021, 16:18
c134b92
Код
Авторство
О чём код?
#!/usr/bin/env python3 """ _GetScenario_ Unittest for GetScenario module """ import unittest from Configuration.DataProcessing.GetScenario import getScenario class GetScenarioTest(unittest.TestCase): """GetScenario module test""" def testA(self): """test retrieving the Test scenario""" try: scenario = getScenario("Test") except Exception as ex: msg = "Failed to get Test scenario:\n" msg += str(ex) self.fail(msg) def testB(self): """test retrieving non existent Scenario""" self.assertRaises(RuntimeError, getScenario, "ThisScenarioDoesNotExist") if __name__ == '__main__': unittest.main()