mirror of
https://github.com/gradio-app/gradio.git
synced 2025-01-12 10:34:32 +08:00
093cc2f3e3
- convert context global fields to class Fields
9 lines
235 B
Python
9 lines
235 B
Python
def test_context():
|
|
from gradio.context import Context
|
|
assert Context.id == 0
|
|
Context.id += 1
|
|
assert Context.id == 1
|
|
Context.root_block = {}
|
|
Context.root_block["1"] = 1
|
|
assert Context.root_block == {"1": 1}
|