mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
features tests
This commit is contained in:
22
tests/test_features.py
Normal file
22
tests/test_features.py
Normal file
@@ -0,0 +1,22 @@
|
||||
from textual.app import App
|
||||
|
||||
|
||||
def test_env_vaer(monkeypatch):
|
||||
monkeypatch.setenv("TEXTUAL", "")
|
||||
app = App()
|
||||
assert app.features == set()
|
||||
assert app.devtools_enabled is False
|
||||
|
||||
monkeypatch.setenv("TEXTUAL", "devtools")
|
||||
app = App()
|
||||
assert app.features == {"devtools"}
|
||||
assert app.devtools_enabled is True
|
||||
|
||||
|
||||
def test_devtools_enabled_property():
|
||||
|
||||
app = App(_features="")
|
||||
assert app.devtools_enabled is False
|
||||
|
||||
app = App(_features="devtools")
|
||||
assert app.devtools_enabled is True
|
||||
Reference in New Issue
Block a user