mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-09 23:34:45 +08:00
Added tests for random.choice
This commit is contained in:
@@ -153,3 +153,16 @@ import json
|
|||||||
json.load('asdf')
|
json.load('asdf')
|
||||||
#?
|
#?
|
||||||
json.loads('[1]')
|
json.loads('[1]')
|
||||||
|
|
||||||
|
# -----------------
|
||||||
|
# random
|
||||||
|
# -----------------
|
||||||
|
|
||||||
|
import random
|
||||||
|
class A(object):
|
||||||
|
def say(self): pass
|
||||||
|
class B(object):
|
||||||
|
def shout(self): pass
|
||||||
|
cls = random.choice([A, B])
|
||||||
|
#? ['say', 'shout']
|
||||||
|
cls().s
|
||||||
|
|||||||
Reference in New Issue
Block a user