
import unittest


class TestCase(unittest.TestCase):
    pass


import platform
(major, minor, patch) = platform.python_version_tuple()
if int(major) == 2 and int(minor) < 7:
    import unittest2 as unittest
else:
    import unittest


class TestCase(unittest.TestCase):
    pass

Make unit tests run on RHEL boxes better via the python-unittest2 library
Make unit tests run on RHEL boxes better via the python-unittest2 library

  
+ import platform
+ (major, minor, patch) = platform.python_version_tuple()
+ if int(major) == 2 and int(minor) < 7:
+     import unittest2 as unittest
+ else:
- import unittest
+     import unittest
  
  
  class TestCase(unittest.TestCase):
      pass
  
Make unit tests run on RHEL boxes better via the python-unittest2 library
## Code Before:

import unittest


class TestCase(unittest.TestCase):
    pass

## Instruction:
Make unit tests run on RHEL boxes better via the python-unittest2 library
## Code After:

import platform
(major, minor, patch) = platform.python_version_tuple()
if int(major) == 2 and int(minor) < 7:
    import unittest2 as unittest
else:
    import unittest


class TestCase(unittest.TestCase):
    pass
