forked from diffpy/diffpy.pdfgui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest_insertrowsdialog.py
53 lines (40 loc) · 1.36 KB
/
test_insertrowsdialog.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#!/usr/bin/env python
##############################################################################
#
# diffpy.pdfgui Complex Modeling Initiative
# (c) 2019 Brookhaven Science Associates,
# Brookhaven National Laboratory.
# All rights reserved.
#
# File coded by: Pavol Juhas
#
# See AUTHORS.txt for a list of people who contributed.
# See LICENSE.txt for license information.
#
##############################################################################
"""
Unit tests for class InsertRowsDialog
"""
import unittest
import wx
from diffpy.pdfgui.gui.insertrowsdialog import InsertRowsDialog
from diffpy.pdfgui.tests.testutils import GUITestCase
# ----------------------------------------------------------------------------
class TestInsertRowsDialog(GUITestCase):
def setUp(self):
self.app = wx.App()
self.dialog = InsertRowsDialog(None)
return
def tearDown(self):
self.dialog.Close()
self.app.Destroy()
return
def test_spin_ctrl_rows(self):
"Check default number of rows to insert"
d = self.dialog
self.assertEqual(1, d.spin_ctrl_Rows.GetValue())
return
# End of class TestInsertRowsDialog
# ----------------------------------------------------------------------------
if __name__ == "__main__":
unittest.main()