Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
OpenGEODE
Commits
837f0333
Commit
837f0333
authored
Apr 22, 2017
by
Maxime Perrotin
Browse files
Set up working test case for GUI testing
parent
f6f3a3d0
Changes
1
Hide whitespace changes
Inline
Side-by-side
tests/pytests/test_qt1.py
View file @
837f0333
...
...
@@ -2,10 +2,10 @@
import
pytest
from
PySide
import
QtCore
from
opengeode.opengeode
import
SDL_Scene
,
SDL_View
from
opengeode.opengeode
import
SDL_Scene
,
SDL_View
,
G_SYMBOLS
from
opengeode.sdlSymbols
import
Label
,
Decision
from
opengeode.ogParser
import
parse
r_init
,
floating_label
from
opengeode.ogAST
import
Process
from
opengeode.ogParser
import
parse
SingleElement
from
opengeode.ogAST
import
Process
,
Automaton
TEST_DATA
=
'''
...
...
@@ -23,13 +23,13 @@ TEST_DATA = '''
'''
def
test_1
(
qtbot
):
''' Test the parsing of numbers '''
test
=
parser_init
(
string
=
TEST_DATA
)
parsed
=
test
.
floating_label
()
ast
,
err
,
warn
=
floating_label
(
parsed
.
tree
,
parent
=
None
,
context
=
Process
())
ast
=
Automaton
()
floating
,
_
,
_
,
_
,
_
=
parseSingleElement
(
'floating_label'
,
TEST_DATA
)
ast
.
floating_labels
=
[
floating
]
ast
.
parent
=
Process
()
scene
=
SDL_Scene
(
context
=
"process"
)
scene
.
render_everything
(
ast
)
assert
(
ast
==
None
)
assert
(
len
(
list
(
scene
.
visible_symb
)))
assert
(
len
(
list
(
scene
.
floating_symb
))
==
1
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment