Exemple #1
0
    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
Exemple #2
0
    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
Exemple #3
0
 def test_button(self, app: GUI):
     with app.root():
         with app.button() as w:
             assert isinstance(w, tw.Button)