google app engine - GAE Python Testing -
first i'm quite new gae/python, please bear me. here's situation
have test_all.py tests test suites in package. testcase's setup current like;
import test_settings policy # has consistency variables <- not work ... def setup(self): # first, create instance of testbed class. self.testbed = testbed.testbed() # activate testbed, prepares service stubs use. self.testbed.activate() # consistency policy nomal operations self.policy = none if policy.policy_flag == 'strict': # create consistency policy simulate high replication consistency model. self.policy = datastore_stub_util.pseudorandomhrconsistencypolicy(probability=0) # initialize datastore stub policy. self.testbed.init_datastore_v3_stub(consistency_policy=self.policy)
this primitive attempt setup datastore different consistency policies run tests against them. total fail.
what want run test cases against different datastore consistencies @ 1 go root test_all.py using above or other, how can this? how pass in parameters testcase test runner?
python, unit test - pass command line arguments setup of unittest.testcase
the above thread shows how best pass runtime arguments test case. answer 2.
Comments
Post a Comment