Skip to content

Commit b2e067a

Browse files
author
Sebastian Wagner
committed
TST: exceptions: pipeline test for py 3.5, 3.6
1 parent d754f12 commit b2e067a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

intelmq/tests/lib/test_exceptions.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
Testing the IntelMQ-specific exceptions
44
"""
55
import unittest
6+
import sys
67

78
import intelmq.lib.exceptions as excs
89

@@ -19,7 +20,10 @@ def test_PipelineError(self):
1920
raise excs.PipelineError(exc)
2021
except excs.PipelineError as exc:
2122
exception = exc
22-
self.assertEqual(exception.args, ('pipeline failed - ValueError(%r)' % message, ))
23+
if sys.version_info < (3, 7):
24+
self.assertEqual(exception.args, ('pipeline failed - ValueError(%r,)' % message, ))
25+
else:
26+
self.assertEqual(exception.args, ('pipeline failed - ValueError(%r)' % message, ))
2327

2428
message = 'some error'
2529
notanexception = excs.PipelineError(message)

0 commit comments

Comments
 (0)