Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
gboml
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
smart_grids
public
gboml
Commits
7e36d447
Commit
7e36d447
authored
2 years ago
by
Derval Guillaume
Browse files
Options
Downloads
Patches
Plain Diff
Fix tests
parent
f3591046
No related branches found
No related tags found
No related merge requests found
Pipeline
#10541
failed
2 years ago
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/test_parsing.py
+10
-3
10 additions, 3 deletions
tests/test_parsing.py
with
10 additions
and
3 deletions
tests/test_parsing.py
+
10
−
3
View file @
7e36d447
import
unittest
import
unittest
from
pathlib
import
Path
from
pathlib
import
Path
from
lark.exceptions
import
UnexpectedCharacters
,
UnexpectedToken
from
gboml.ast.check
import
check
from
gboml.ast.check
import
check
from
gboml.parsing
import
parse_file
from
gboml.parsing
import
parse_file
...
@@ -25,13 +27,18 @@ class TestParsing(unittest.TestCase):
...
@@ -25,13 +27,18 @@ class TestParsing(unittest.TestCase):
"""
Checks if the file (doesn
'
t) parses
"""
"""
Checks if the file (doesn
'
t) parses
"""
for
filename
in
should_pass
:
for
filename
in
should_pass
:
with
self
.
subTest
(
filename
=
filename
):
with
self
.
subTest
(
filename
=
filename
):
check
(
parse_file
(
str
(
filename
)))
out
=
parse_file
(
str
(
filename
))
check
(
out
)
@unittest.expectedFailure
def
test_not_parse
(
self
):
def
test_not_parse
(
self
):
for
filename
in
should_not_pass
:
for
filename
in
should_not_pass
:
with
self
.
subTest
(
filename
=
filename
):
with
self
.
subTest
(
filename
=
filename
):
parse_file
(
str
(
filename
))
try
:
out
=
parse_file
(
str
(
filename
))
check
(
out
)
except
:
continue
raise
Exception
(
"
Shouldn
'
t success
"
)
if
__name__
==
'
__main__
'
:
if
__name__
==
'
__main__
'
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment