SimpleAB. , A/B. SimpleAB :
- SimpleAB. AB A, B,..., Z.
>>> import simpleab
>>> class MyTest(simpleab.SimpleAB):
... name = 'MyTest'
... def A(self): return 'Side A'
... def B(self): return 'Side B'
... def C(self): return 'Side C'
...
>>> myab = MyTest()
>>> myab.test()
'Side A'
>>> myab.current_side
'A'
>>> myab.test(force_side='C')
'Side C'
>>> improt simpleab
>>> import random
>>> myab = simpleab.ConfigurableAB(name='MyTest',
... sides={'A': 'Side A', 'B': 'Side B'},
... selector=lambda: random.choice(['A','B']))
>>> myab
<ConfigurableAB [name: MyTest, sides: ['A', 'B']]>
>>> myab.test()
'Side A'
>>> myab.current_side
'A'
In fact, lib does not yet have reliable support for data warehouses and analytical tools, but it allows you to quickly implement this material. I think this will be done soon :)
source
share