Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
python-oceandsls
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
oceandsl
python-oceandsls
Commits
c0a732d5
Commit
c0a732d5
authored
5 months ago
by
Sven Gundlach
Browse files
Options
Downloads
Patches
Plain Diff
Revert "Test qodo-test"
parent
e964fe27
No related branches found
No related tags found
No related merge requests found
Pipeline
#17323
passed
5 months ago
Stage: test
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
.gitignore
+0
-2
0 additions, 2 deletions
.gitignore
tdd-dsl/tests/test_fxtran_utils.py
+1
-17
1 addition, 17 deletions
tdd-dsl/tests/test_fxtran_utils.py
with
1 addition
and
19 deletions
.gitignore
+
0
−
2
View file @
c0a732d5
...
@@ -187,5 +187,3 @@ example-dsl/examplelspserver/other/
...
@@ -187,5 +187,3 @@ example-dsl/examplelspserver/other/
#BGC-DSL tmp files
#BGC-DSL tmp files
bgc-dsl/bgcLSPServer/other/
bgc-dsl/bgcLSPServer/other/
antlrLib/dist/
antlrLib/dist/
.qodo
This diff is collapsed.
Click to expand it.
tdd-dsl/tests/test_fxtran_utils.py
+
1
−
17
View file @
c0a732d5
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
import
unittest
import
unittest
from
os
import
path
from
os
import
path
from
unittest.mock
import
patch
,
mock_open
,
Mock
,
MagicMock
from
unittest.mock
import
patch
,
mock_open
,
MagicMock
from
parameterized
import
parameterized
from
parameterized
import
parameterized
import
subprocess
import
subprocess
...
@@ -55,11 +55,6 @@ class TestFxtranUtils(unittest.TestCase):
...
@@ -55,11 +55,6 @@ class TestFxtranUtils(unittest.TestCase):
# Test case for filtering XML with public elements
# Test case for filtering XML with public elements
# Input: A valid XML path and a list of modules with public elements
# Input: A valid XML path and a list of modules with public elements
# Expected Result: The function should process the XML and return the expected results.
# Expected Result: The function should process the XML and return the expected results.
(
"
filter_xml_test_with_modules_and_public
"
,
TEST_XML_PATH
,
True
,
[
MODULE_MOCK
],
{},
([(
"
var1
"
,
"
INTEGER
"
,
"
moduleMock
"
)],
[(
"
function
"
,
"
test_function
"
,
[
"
arg1
"
],
None
,
"
moduleMock
"
,
False
)])),
# Test case for filtering XML with modules and public elements
# Input: XML structure with a module and public elements
# Expected Result: The function should return the correct variables and scopes.
])
])
@patch
(
"
fxca.util.fxtran_utils.ET.parse
"
)
@patch
(
"
fxca.util.fxtran_utils.ET.parse
"
)
@patch
(
"
fxca.util.fxtran_utils.PublicObj
"
)
@patch
(
"
fxca.util.fxtran_utils.PublicObj
"
)
...
@@ -67,17 +62,6 @@ class TestFxtranUtils(unittest.TestCase):
...
@@ -67,17 +62,6 @@ class TestFxtranUtils(unittest.TestCase):
# Setup the mocks
# Setup the mocks
mock_tree
=
mock_et_parse
.
return_value
mock_tree
=
mock_et_parse
.
return_value
mock_tree
.
getroot
.
return_value
.
iter
.
return_value
=
[]
# Mocking an empty XML structure
mock_tree
.
getroot
.
return_value
.
iter
.
return_value
=
[]
# Mocking an empty XML structure
# mock_tree.getroot.return_value.iter.return_value = [
# # Mocking XML elements
# Mock(tag="{http://fxtran.net/#syntax}module-stmt"),
# Mock(tag="{http://fxtran.net/#syntax}T-decl-stmt"),
# Mock(tag="{http://fxtran.net/#syntax}public-stmt"),
# Mock(tag="{http://fxtran.net/#syntax}contains-stmt"),
# Mock(tag="{http://fxtran.net/#syntax}function-stmt"),
# Mock(tag="{http://fxtran.net/#syntax}end-function-stmt"),
# Mock(tag="{http://fxtran.net/#syntax}end-module-stmt")
# ]
# mock_public_obj.return_value.is_public.return_value = need_public
result
=
filter_xml
(
xml_path
,
need_public
,
modules
,
files
)
result
=
filter_xml
(
xml_path
,
need_public
,
modules
,
files
)
...
...
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