本文整理匯總了Python中job.configuration.interface.error_interface.ErrorInterface.get_error_names方法的典型用法代碼示例。如果您正苦於以下問題:Python ErrorInterface.get_error_names方法的具體用法?Python ErrorInterface.get_error_names怎麽用?Python ErrorInterface.get_error_names使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類job.configuration.interface.error_interface.ErrorInterface
的用法示例。
在下文中一共展示了ErrorInterface.get_error_names方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: test_get_error_names_none
# 需要導入模塊: from job.configuration.interface.error_interface import ErrorInterface [as 別名]
# 或者: from job.configuration.interface.error_interface.ErrorInterface import get_error_names [as 別名]
def test_get_error_names_none(self):
"""Tests getting error names when there is no error interface."""
error_interface_dict = {}
error_interface = ErrorInterface(error_interface_dict)
error_names = error_interface.get_error_names()
self.assertSetEqual(error_names, set())
示例2: test_get_error_names_empty
# 需要導入模塊: from job.configuration.interface.error_interface import ErrorInterface [as 別名]
# 或者: from job.configuration.interface.error_interface.ErrorInterface import get_error_names [as 別名]
def test_get_error_names_empty(self):
"""Tests getting error names when there are no exit codes defined."""
error_interface_dict = {u"version": u"1.0", u"exit_codes": {}}
error_interface = ErrorInterface(error_interface_dict)
error_names = error_interface.get_error_names()
self.assertSetEqual(error_names, set())
示例3: test_get_error_names
# 需要導入模塊: from job.configuration.interface.error_interface import ErrorInterface [as 別名]
# 或者: from job.configuration.interface.error_interface.ErrorInterface import get_error_names [as 別名]
def test_get_error_names(self):
"""Tests getting error names from the mapping."""
error_interface_dict = {u"version": u"1.0", u"exit_codes": {u"1": self.error_1.name, u"2": self.error_2.name}}
error_interface = ErrorInterface(error_interface_dict)
error_names = error_interface.get_error_names()
self.assertSetEqual(error_names, {self.error_1.name, self.error_2.name})
示例4: test_get_error_names_empty
# 需要導入模塊: from job.configuration.interface.error_interface import ErrorInterface [as 別名]
# 或者: from job.configuration.interface.error_interface.ErrorInterface import get_error_names [as 別名]
def test_get_error_names_empty(self):
"""Tests getting error names when there are no exit codes defined."""
error_interface_dict = {
'version': '1.0',
'exit_codes': {},
}
error_interface = ErrorInterface(error_interface_dict)
error_names = error_interface.get_error_names()
self.assertSetEqual(error_names, set())
示例5: test_get_error_names_unique
# 需要導入模塊: from job.configuration.interface.error_interface import ErrorInterface [as 別名]
# 或者: from job.configuration.interface.error_interface.ErrorInterface import get_error_names [as 別名]
def test_get_error_names_unique(self):
"""Tests getting error names without duplicates."""
error_interface_dict = {
u"version": u"1.0",
u"exit_codes": {u"0": self.error_1.name, u"2": self.error_2.name, u"5": self.error_1.name},
}
error_interface = ErrorInterface(error_interface_dict)
error_names = error_interface.get_error_names()
self.assertSetEqual(error_names, {self.error_1.name, self.error_2.name})
示例6: test_get_error_names
# 需要導入模塊: from job.configuration.interface.error_interface import ErrorInterface [as 別名]
# 或者: from job.configuration.interface.error_interface.ErrorInterface import get_error_names [as 別名]
def test_get_error_names(self):
"""Tests getting error names from the mapping."""
error_interface_dict = {
'version': '1.0',
'exit_codes': {
'1': self.error_1.name,
'2': self.error_2.name,
},
}
error_interface = ErrorInterface(error_interface_dict)
error_names = error_interface.get_error_names()
self.assertSetEqual(error_names, {self.error_1.name, self.error_2.name})
示例7: test_get_error_names_unique
# 需要導入模塊: from job.configuration.interface.error_interface import ErrorInterface [as 別名]
# 或者: from job.configuration.interface.error_interface.ErrorInterface import get_error_names [as 別名]
def test_get_error_names_unique(self):
"""Tests getting error names without duplicates."""
error_interface_dict = {
'version': '1.0',
'exit_codes': {
'0': self.error_1.name,
'2': self.error_2.name,
'5': self.error_1.name,
},
}
error_interface = ErrorInterface(error_interface_dict)
error_names = error_interface.get_error_names()
self.assertSetEqual(error_names, {self.error_1.name, self.error_2.name})