1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
|
Description: Use test.support if Python 3 to enable test suite on Python 3
Author: Iain R. Learmonth <irl@debian.org>
Last-Update: 2016-09-23
---
--- a/tests/applicationinsights_tests/TestTelemetryClient.py
+++ b/tests/applicationinsights_tests/TestTelemetryClient.py
@@ -1,10 +1,15 @@
+import sys
+import os
+import os.path
import unittest
import inspect
import json
-from test import test_support
+if sys.version_info < (3, 0):
+ from test import test_support
+else:
+ from test import support as test_support
-import sys, os, os.path
rootDirectory = os.path.join(os.path.dirname(os.path.realpath(__file__)), '..', '..')
if rootDirectory not in sys.path:
sys.path.append(rootDirectory)
|