Skip to content

Commit 982557f

Browse files
author
fsalmoir
committed
some documentation and tests added for the gui new features
1 parent 8ec5254 commit 982557f

File tree

3 files changed

+15
-2
lines changed

3 files changed

+15
-2
lines changed

pygem/gui.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ class Gui(object):
3838
:cvar string url: url of the github page of PyGeM.
3939
:cvar Tkinter.Canvas logo_panel: canvas for PyGeM logo.
4040
:cvar Tkinter.PhotoImage img: PyGeM logo.
41+
:cvar Tkinter.Frame orig_geo_frame: frame for plotting of the original geometry.
42+
:cvar Tkinter.Frame mod_geo_frame: frame for plotting of the final geometry.
4143
4244
"""
4345

@@ -63,8 +65,6 @@ def __init__(self):
6365
self.url = 'https://github.com/mathLab/PyGeM'
6466
self.logo_panel = None
6567
self.img = None
66-
67-
6868
self.orig_geo_frame = None
6969
self.mod_geo_frame = None
7070

pygem/vtkhandler.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,9 @@ def plot(self, plot_file=None, save_fig=False):
106106
:param string plot_file: the vtk filename you want to plot.
107107
:param bool save_fig: a flag to save the figure in png or not. If True the
108108
plot is not shown.
109+
110+
:return: figure: matlplotlib structure for the figure of the chosen geometry
111+
:rtype: matplotlib.pyplot.figure
109112
"""
110113
if plot_file is None:
111114
plot_file = self.infile

tests/test_gui.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,16 @@ def test_gui_init_none_4(self):
8080
gui_handler = gui.Gui()
8181
assert gui_handler.img == None
8282

83+
84+
def test_gui_init_none_5(self):
85+
gui_handler = gui.Gui()
86+
assert gui_handler.orig_geo_frame == None
87+
88+
89+
def test_gui_init_none_6(self):
90+
gui_handler = gui.Gui()
91+
assert gui_handler.mod_geo_frame == None
92+
8393

8494
def test_gui_init_all(self):
8595
gui.Gui()

0 commit comments

Comments
 (0)