pycassa/pycassa — pull request #115 by bshanks (2012-01-22 14:12:00+00:00)
Title: set column validators in batch in alter_column_family

added column_validation_classes={} option to alter_column_family to allow the user to set column validators in batch

note: i didn't/couldn't run the unit tests because i got:

bshanks@bshanks:~/prog/pycassa$ nosetests
Traceback (most recent call last):
File "/usr/local/bin/nosetests", line 9, in
load_entry_point('nose==1.1.2', 'console_scripts', 'nosetests')()
File "/usr/local/lib/python2.7/dist-packages/nose/core.py", line 118, in __init__
**extra_args)
File "/usr/lib/python2.7/unittest/main.py", line 95, in __init__
self.runTests()
File "/usr/local/lib/python2.7/dist-packages/nose/core.py", line 197, in runTests
result = self.testRunner.run(self.test)
File "/usr/local/lib/python2.7/dist-packages/nose/core.py", line 61, in run
test(result)
File "/usr/local/lib/python2.7/dist-packages/nose/suite.py", line 176, in __call__
return self.run(*arg, **kw)
File "/usr/local/lib/python2.7/dist-packages/nose/suite.py", line 223, in run
test(orig)
File "/usr/lib/python2.7/unittest/suite.py", line 70, in __call__
return self.run(*args, **kwds)
File "/usr/local/lib/python2.7/dist-packages/nose/suite.py", line 74, in run
test(result)
File "/usr/local/lib/python2.7/dist-packages/nose/suite.py", line 176, in __call__
return self.run(*arg, **kw)
File "/usr/local/lib/python2.7/dist-packages/nose/suite.py", line 213, in run
result.addError(self, self._exc_info())
File "/usr/local/lib/python2.7/dist-packages/nose/proxy.py", line 134, in addError
plugins.addError(self.test, err)
File "/usr/local/lib/python2.7/dist-packages/nose/plugins/manager.py", line 94, in __call__
return self.call(*arg, **kw)
File "/usr/local/lib/python2.7/dist-packages/nose/plugins/manager.py", line 162, in simple
result = meth(*arg, **kw)
File "/usr/local/lib/python2.7/dist-packages/nose/plugins/manager.py", line 320, in addError
return self.plugin.addError(test.test, err, capt)
AttributeError: 'ContextSuite' object has no attribute 'test'

(and similarly if i ran it from the "tests" directory:

bshanks@bshanks:~/prog/pycassa/tests$ nosetests
Traceback (most recent call last):
File "/usr/local/bin/nosetests", line 9, in
load_entry_point('nose==1.1.2', 'console_scripts', 'nosetests')()
File "/usr/local/lib/python2.7/dist-packages/nose/core.py", line 118, in __init__
**extra_args)
File "/usr/lib/python2.7/unittest/main.py", line 95, in __init__
self.runTests()
File "/usr/local/lib/python2.7/dist-packages/nose/core.py", line 197, in runTests
result = self.testRunner.run(self.test)
File "/usr/local/lib/python2.7/dist-packages/nose/core.py", line 61, in run
test(result)
File "/usr/local/lib/python2.7/dist-packages/nose/suite.py", line 176, in __call__
return self.run(*arg, **kw)
File "/usr/local/lib/python2.7/dist-packages/nose/suite.py", line 213, in run
result.addError(self, self._exc_info())
File "/usr/local/lib/python2.7/dist-packages/nose/proxy.py", line 134, in addError
plugins.addError(self.test, err)
File "/usr/local/lib/python2.7/dist-packages/nose/plugins/manager.py", line 94, in __call__
return self.call(*arg, **kw)
File "/usr/local/lib/python2.7/dist-packages/nose/plugins/manager.py", line 162, in simple
result = meth(*arg, **kw)
File "/usr/local/lib/python2.7/dist-packages/nose/plugins/manager.py", line 320, in addError
return self.plugin.addError(test.test, err, capt)
AttributeError: 'ContextSuite' object has no attribute 'test'

)