Coverage for tests/unit/lib/ui/test_dialogs.py: 100%
20 statements
« prev ^ index » next coverage.py v7.4.4, created at 2024-03-20 05:56 +0000
« prev ^ index » next coverage.py v7.4.4, created at 2024-03-20 05:56 +0000
1import os
3import wx
4from tatlin.lib.ui.dialogs import AboutDialog, OpenDialog, OpenErrorAlert, QuitDialog
5from tatlin.lib.util import resolve_path
6from tests.guitestcase import GUITestCase
9class DialogsTest(GUITestCase):
10 def test_open_dialog(self):
11 dlg = OpenDialog(self.frame, os.getcwd())
12 wx.CallLater(250, dlg.EndModal, wx.ID_CANCEL)
13 dlg.get_path()
14 dlg.get_type()
15 dlg.Destroy()
17 def test_quit_dialog(self):
18 dlg = QuitDialog(self.frame)
19 wx.CallLater(250, dlg.EndModal, wx.ID_SAVE)
20 dlg.show()
21 dlg.Destroy()
23 def test_about_dialog(self):
24 icon = wx.Icon(resolve_path("tatlin.png"), wx.BITMAP_TYPE_PNG)
25 about = AboutDialog("1.0", icon, "")