def test_it(self, app: GUI): with pytest.raises(ValueError): app.it() with app.root() as root: assert app.it() is root with app.button() as button: assert app.it() is button
def test_with_it(self): app, it = GUI().with_it() with pytest.raises(ValueError): it() with app.root() as root: assert it() is root with app.button() as button: assert it() is button
def test_button(self, app: GUI): with app.root(): with app.button() as w: assert isinstance(w, tw.Button)