提交 b45dcfee 编写于 作者: L luopengting

reduce nbnc in test_get_summary_lineage_exception_2

上级 81250b16
...@@ -283,33 +283,6 @@ class TestModelApi(TestCase): ...@@ -283,33 +283,6 @@ class TestModelApi(TestCase):
['metric', 'fake_name'] ['metric', 'fake_name']
) )
self.assertRaisesRegex(
LineageParamTypeError,
'Keys must be list.',
get_summary_lineage,
None,
SUMMARY_DIR,
0
)
self.assertRaisesRegex(
LineageParamTypeError,
'Keys must be list.',
get_summary_lineage,
None,
SUMMARY_DIR,
0.1
)
self.assertRaisesRegex(
LineageParamTypeError,
'Keys must be list.',
get_summary_lineage,
None,
SUMMARY_DIR,
True
)
self.assertRaisesRegex( self.assertRaisesRegex(
LineageParamTypeError, LineageParamTypeError,
'Element of keys must be str.', 'Element of keys must be str.',
...@@ -319,23 +292,23 @@ class TestModelApi(TestCase): ...@@ -319,23 +292,23 @@ class TestModelApi(TestCase):
[1, 2, 3] [1, 2, 3]
) )
self.assertRaisesRegex( @pytest.mark.level0
LineageParamTypeError, @pytest.mark.platform_arm_ascend_training
'Keys must be list.', @pytest.mark.platform_x86_gpu_training
get_summary_lineage, @pytest.mark.platform_x86_ascend_training
None, @pytest.mark.platform_x86_cpu
SUMMARY_DIR, @pytest.mark.env_single
(3, 4) def test_get_summary_lineage_exception_3(self):
) """Test the interface of get_summary_lineage with exception."""
for keys in [0, 0.1, True, (3, 4), {'a': 'b'}]:
self.assertRaisesRegex( self.assertRaisesRegex(
LineageParamTypeError, LineageParamTypeError,
'Keys must be list.', 'Keys must be list.',
get_summary_lineage, get_summary_lineage,
None, None,
SUMMARY_DIR, SUMMARY_DIR,
{'a': 'b'} keys
) )
@pytest.mark.level0 @pytest.mark.level0
@pytest.mark.platform_arm_ascend_training @pytest.mark.platform_arm_ascend_training
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册