Add unittest2 as test req in setup.py

This commit is contained in:
Tyler Hobbs
2014-01-15 12:18:18 -06:00
parent 0cde621290
commit 488c333b4e
2 changed files with 7 additions and 2 deletions

View File

@@ -25,6 +25,7 @@ long_description = ""
with open("README.rst") as f:
long_description = f.read()
class DocCommand(Command):
description = "generate or test documentation"
@@ -162,7 +163,7 @@ def run_setup(extensions):
packages=['cassandra', 'cassandra.io'],
include_package_data=True,
install_requires=dependencies,
tests_require=['nose', 'mock', 'ccm'],
tests_require=['nose', 'mock', 'ccm', 'unittest2'],
classifiers=[
'Development Status :: 4 - Beta',
'Intended Audience :: Developers',

View File

@@ -1,4 +1,7 @@
import unittest
try:
import unittest2 as unittest
except ImportError:
import unittest # noqa
import cassandra
from cassandra.metadata import (TableMetadata, Murmur3Token, MD5Token,
@@ -128,6 +131,7 @@ class TestStrategies(unittest.TestCase):
self.assertItemsEqual(rf3_replicas[MD5Token(100)], [host2, host3, host1])
self.assertItemsEqual(rf3_replicas[MD5Token(200)], [host3, host1, host2])
class TestTokens(unittest.TestCase):
def test_protect_name(self):