gradio/test/test_context.py
Ömer Faruk Özdemir 093cc2f3e3 Gradio-Dashboard
- convert context global fields to class Fields
2022-02-17 16:42:44 +03:00

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}