mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
Added test for batch update
This commit is contained in:
12
tests/test_app.py
Normal file
12
tests/test_app.py
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
from textual.app import App
|
||||||
|
|
||||||
|
|
||||||
|
def test_batch_update():
|
||||||
|
app = App()
|
||||||
|
assert app._batch_count == 0
|
||||||
|
with app.batch_update():
|
||||||
|
assert app._batch_count == 1
|
||||||
|
with app.batch_update():
|
||||||
|
assert app._batch_count == 2
|
||||||
|
assert app._batch_count == 1
|
||||||
|
assert app._batch_count == 0
|
||||||
Reference in New Issue
Block a user