コード例 #1
0
ファイル: test_gui.py プロジェクト: mtkennerly/tkup
    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
コード例 #2
0
ファイル: test_gui.py プロジェクト: mtkennerly/tkup
    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
コード例 #3
0
ファイル: test_gui.py プロジェクト: mtkennerly/tkup
 def test_button(self, app: GUI):
     with app.root():
         with app.button() as w:
             assert isinstance(w, tw.Button)