reflex/tests/units/components/datadisplay/test_code.py
Thomas Brandého 42e6dfa40d
enable PGH, bump pyright and fix all #type: ignore (#4699)
* enable PGH, bump pyright and fix  all #type: ignore

* relock poetry file

* ignore incompatible override

* fix varop tests

* ignore missing imports

* fix

* fix stuff

* fix tests

* rechange tests

* relock with poetry 2.0
2025-01-28 13:11:05 -08:00

14 lines
392 B
Python

import pytest
from reflex.components.datadisplay.code import CodeBlock, Theme
@pytest.mark.parametrize(
"theme, expected",
[(Theme.one_light, "oneLight"), (Theme.one_dark, "oneDark")],
)
def test_code_light_dark_theme(theme, expected):
code_block = CodeBlock.create(theme=theme)
assert code_block.theme._js_expr == expected # pyright: ignore [reportAttributeAccessIssue]