File: base_test_case.py

package info (click to toggle)
radiotherm 2.1.0-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 196 kB
  • sloc: python: 661; makefile: 6; sh: 5
file content (14 lines) | stat: -rw-r--r-- 316 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import sys

try:
    import unittest2 as unittest
except ImportError:
    import unittest

class BaseTestCase(unittest.TestCase):
    @staticmethod
    def _get_urlopen_import_path():
        if sys.version_info < (3,0):
            return 'urllib2.urlopen'
        else:
            return 'urllib.request.urlopen'