forked from pycassa/pycassa
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Also skip range tests if using Murmur3Partitioner
- Loading branch information
Showing
3 changed files
with
37 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
from functools import wraps | ||
|
||
from nose.plugins.skip import SkipTest | ||
|
||
def requireOPP(f): | ||
""" Decorator to require an order-preserving partitioner """ | ||
|
||
@wraps(f) | ||
def wrapper(self, *args, **kwargs): | ||
partitioner = self.sys_man.describe_partitioner() | ||
if partitioner in ('RandomPartitioner', 'Murmur3Partitioner'): | ||
raise SkipTest('Must use order preserving partitioner for this test') | ||
return f(*args, **kwargs) | ||
|
||
return wrapper |