Add unittest2 as test req in setup.py
This commit is contained in:
3
setup.py
3
setup.py
@@ -25,6 +25,7 @@ long_description = ""
|
|||||||
with open("README.rst") as f:
|
with open("README.rst") as f:
|
||||||
long_description = f.read()
|
long_description = f.read()
|
||||||
|
|
||||||
|
|
||||||
class DocCommand(Command):
|
class DocCommand(Command):
|
||||||
|
|
||||||
description = "generate or test documentation"
|
description = "generate or test documentation"
|
||||||
@@ -162,7 +163,7 @@ def run_setup(extensions):
|
|||||||
packages=['cassandra', 'cassandra.io'],
|
packages=['cassandra', 'cassandra.io'],
|
||||||
include_package_data=True,
|
include_package_data=True,
|
||||||
install_requires=dependencies,
|
install_requires=dependencies,
|
||||||
tests_require=['nose', 'mock', 'ccm'],
|
tests_require=['nose', 'mock', 'ccm', 'unittest2'],
|
||||||
classifiers=[
|
classifiers=[
|
||||||
'Development Status :: 4 - Beta',
|
'Development Status :: 4 - Beta',
|
||||||
'Intended Audience :: Developers',
|
'Intended Audience :: Developers',
|
||||||
|
|||||||
@@ -1,4 +1,7 @@
|
|||||||
import unittest
|
try:
|
||||||
|
import unittest2 as unittest
|
||||||
|
except ImportError:
|
||||||
|
import unittest # noqa
|
||||||
|
|
||||||
import cassandra
|
import cassandra
|
||||||
from cassandra.metadata import (TableMetadata, Murmur3Token, MD5Token,
|
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(100)], [host2, host3, host1])
|
||||||
self.assertItemsEqual(rf3_replicas[MD5Token(200)], [host3, host1, host2])
|
self.assertItemsEqual(rf3_replicas[MD5Token(200)], [host3, host1, host2])
|
||||||
|
|
||||||
|
|
||||||
class TestTokens(unittest.TestCase):
|
class TestTokens(unittest.TestCase):
|
||||||
|
|
||||||
def test_protect_name(self):
|
def test_protect_name(self):
|
||||||
|
|||||||
Reference in New Issue
Block a user