Ejemplo n.º 1
0
 def test_apply_theme(self) -> None:
     t = Theme(json={})
     d = Document()
     orig = d.theme
     beu._set_temp_theme(d, t)
     assert beu._themes[d] is orig
     assert d.theme is t
Ejemplo n.º 2
0
 def test_apply_theme(self):
     t = Theme(json={})
     d = Document()
     orig = d.theme
     beu._set_temp_theme(d, t)
     assert d._old_theme is orig
     assert d.theme is t
Ejemplo n.º 3
0
 def test_apply_theme(self):
     t = Theme(json={})
     d = Document()
     orig = d.theme
     beu._set_temp_theme(d, t)
     assert d._old_theme is orig
     assert d.theme is t
Ejemplo n.º 4
0
 def test_apply_from_curdoc(self):
     t = Theme(json={})
     curdoc().theme = t
     d = Document()
     orig = d.theme
     beu._set_temp_theme(d, beu.FromCurdoc)
     assert d._old_theme is orig
     assert d.theme is t
Ejemplo n.º 5
0
 def test_apply_from_curdoc(self):
     t = Theme(json={})
     curdoc().theme = t
     d = Document()
     orig = d.theme
     beu._set_temp_theme(d, beu.FromCurdoc)
     assert d._old_theme is orig
     assert d.theme is t
Ejemplo n.º 6
0
 def test_apply_None(self):
     d = Document()
     orig = d.theme
     beu._set_temp_theme(d, None)
     assert d._old_theme is orig
     assert d.theme is orig
Ejemplo n.º 7
0
 def test_apply_None(self) -> None:
     d = Document()
     orig = d.theme
     beu._set_temp_theme(d, None)
     assert beu._themes[d] is orig
     assert d.theme is orig
Ejemplo n.º 8
0
 def test_apply_None(self):
     d = Document()
     orig = d.theme
     beu._set_temp_theme(d, None)
     assert d._old_theme is orig
     assert d.theme is orig