Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
D
dccQuantities
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
Container 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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
DigitalDynamicMeasurement
dccQuantities
Commits
8a9c294a
Commit
8a9c294a
authored
1 year ago
by
Benedikt
Browse files
Options
Downloads
Plain Diff
Merge remote-tracking branch 'origin/renaming' into renaming
parents
f511d44b
297e6643
Branches
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#37468
failed
1 year ago
Stage: test
Stage: generate_uml
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.gitignore
+5
-1
5 additions, 1 deletion
.gitignore
tests/test_dccQuantsAndTabs.py
+4
-4
4 additions, 4 deletions
tests/test_dccQuantsAndTabs.py
with
9 additions
and
5 deletions
.gitignore
+
5
−
1
View file @
8a9c294a
...
@@ -6,6 +6,10 @@ custom_filename.html
...
@@ -6,6 +6,10 @@ custom_filename.html
venv/
venv/
.~lock.*.xlsx#
.~lock.*.xlsx#
src/dccQuantities.egg-info/
src/dccQuantsAndTabs.egg-info/
build/lib/dccQuantsAndTabs/
dist/
dist/
src/dccQuantities.egg-info/
This diff is collapsed.
Click to expand it.
tests/test_dccQuantsAndTabs.py
+
4
−
4
View file @
8a9c294a
...
@@ -127,7 +127,7 @@ def test_xmlDumpingSingleVectorNoUncer():
...
@@ -127,7 +127,7 @@ def test_xmlDumpingSingleVectorNoUncer():
loadedVec
=
dccQuantity
.
fromDCCXMLJSON
(
jsonSTR
)
loadedVec
=
dccQuantity
.
fromDCCXMLJSON
(
jsonSTR
)
assert
loadedVec
==
testVector
assert
loadedVec
==
testVector
XML
=
loadedVec
.
toXML
()
XML
=
loadedVec
.
toXML
()
with
open
(
"
tests/
test_xmlDumpingSingleVectorNoUncer.xml
"
)
as
XMlFile
:
with
open
(
"
test_xmlDumpingSingleVectorNoUncer.xml
"
)
as
XMlFile
:
assert
remove_whitespacesFromXML
(
XMlFile
.
read
())
==
remove_whitespacesFromXML
(
XML
)
assert
remove_whitespacesFromXML
(
XMlFile
.
read
())
==
remove_whitespacesFromXML
(
XML
)
def
test_multiVector_jsonDumping
():
def
test_multiVector_jsonDumping
():
...
@@ -166,7 +166,7 @@ def test_multiVectorJSONDumpingAndLoadingFromFile():
...
@@ -166,7 +166,7 @@ def test_multiVectorJSONDumpingAndLoadingFromFile():
testDsiVectorPhase
=
dccQuantity
((
np
.
arange
(
20
)
+
1
)
*
0.1
*
3
,
np
.
ones
(
20
)
*
0.1
,
'
Phase
'
,
r
'
\radian
'
,
uncerType
=
"
relPercent
"
,
name
=
{
'
EN
'
:
'
Phase
'
,
'
DE
'
:
'
Phase
'
})
testDsiVectorPhase
=
dccQuantity
((
np
.
arange
(
20
)
+
1
)
*
0.1
*
3
,
np
.
ones
(
20
)
*
0.1
,
'
Phase
'
,
r
'
\radian
'
,
uncerType
=
"
relPercent
"
,
name
=
{
'
EN
'
:
'
Phase
'
,
'
DE
'
:
'
Phase
'
})
testMultVector
=
dccQuantityTable
([
testDSiVectorFreq
],
[
testDsiVectorMag
,
testDsiVectorPhase
])
testMultVector
=
dccQuantityTable
([
testDSiVectorFreq
],
[
testDsiVectorMag
,
testDsiVectorPhase
])
jsonDict
=
testMultVector
.
toDCCquantityList
()
jsonDict
=
testMultVector
.
toDCCquantityList
()
with
open
(
"
tests/
test_multiVectorJSONDumpingAndLoadingFromFile.json
"
,
encoding
=
'
utf-8
'
)
as
JSONFile
:
with
open
(
"
test_multiVectorJSONDumpingAndLoadingFromFile.json
"
,
encoding
=
'
utf-8
'
)
as
JSONFile
:
loadedMultiVec
=
dccQuantityTable
.
fromJson
(
JSONFile
.
read
())
loadedMultiVec
=
dccQuantityTable
.
fromJson
(
JSONFile
.
read
())
isEqual
=
(
loadedMultiVec
==
testMultVector
)
isEqual
=
(
loadedMultiVec
==
testMultVector
)
assert
isEqual
==
True
assert
isEqual
==
True
...
@@ -177,7 +177,7 @@ def test_multiVectorToXML():
...
@@ -177,7 +177,7 @@ def test_multiVectorToXML():
testDsiVectorPhase
=
dccQuantity
((
np
.
arange
(
20
)
+
1
)
*
0.1
*
3
,
np
.
ones
(
20
)
*
0.1
,
'
Phase
'
,
r
'
\radian
'
,
uncerType
=
"
relPercent
"
,
name
=
{
'
EN
'
:
'
Phase
'
,
'
DE
'
:
'
Phase
'
})
testDsiVectorPhase
=
dccQuantity
((
np
.
arange
(
20
)
+
1
)
*
0.1
*
3
,
np
.
ones
(
20
)
*
0.1
,
'
Phase
'
,
r
'
\radian
'
,
uncerType
=
"
relPercent
"
,
name
=
{
'
EN
'
:
'
Phase
'
,
'
DE
'
:
'
Phase
'
})
testMultVector
=
dccQuantityTable
([
testDSiVectorFreq
],
[
testDsiVectorMag
,
testDsiVectorPhase
])
testMultVector
=
dccQuantityTable
([
testDSiVectorFreq
],
[
testDsiVectorMag
,
testDsiVectorPhase
])
createdXML
=
testMultVector
.
toXML
()
createdXML
=
testMultVector
.
toXML
()
with
open
(
"
tests/
test_multiVectorXMLDumping.xml
"
)
as
XMlFile
:
with
open
(
"
test_multiVectorXMLDumping.xml
"
)
as
XMlFile
:
assert
remove_whitespacesFromXML
(
XMlFile
.
read
())
==
remove_whitespacesFromXML
(
createdXML
)
assert
remove_whitespacesFromXML
(
XMlFile
.
read
())
==
remove_whitespacesFromXML
(
createdXML
)
def
test_tableDumping
():
def
test_tableDumping
():
...
@@ -186,7 +186,7 @@ def test_tableDumping():
...
@@ -186,7 +186,7 @@ def test_tableDumping():
testDsiVectorPhase
=
dccQuantity
((
np
.
arange
(
20
)
+
1
)
*
0.1
*
3
,
np
.
ones
(
20
)
*
0.1
,
'
Phase
'
,
r
'
\radian
'
,
uncerType
=
"
relPercent
"
,
name
=
{
'
EN
'
:
'
Phase
'
,
'
DE
'
:
'
Phase
'
})
testDsiVectorPhase
=
dccQuantity
((
np
.
arange
(
20
)
+
1
)
*
0.1
*
3
,
np
.
ones
(
20
)
*
0.1
,
'
Phase
'
,
r
'
\radian
'
,
uncerType
=
"
relPercent
"
,
name
=
{
'
EN
'
:
'
Phase
'
,
'
DE
'
:
'
Phase
'
})
testMultVector
=
dccQuantityTable
([
testDSiVectorFreq
],
[
testDsiVectorMag
,
testDsiVectorPhase
])
testMultVector
=
dccQuantityTable
([
testDSiVectorFreq
],
[
testDsiVectorMag
,
testDsiVectorPhase
])
csvStr
=
testMultVector
.
dump_csv
()
csvStr
=
testMultVector
.
dump_csv
()
with
open
(
"
tests/
test_tableDumping.csv
"
,
'
r
'
,
encoding
=
'
utf-8
'
)
as
csvFile
:
with
open
(
"
test_tableDumping.csv
"
,
'
r
'
,
encoding
=
'
utf-8
'
)
as
csvFile
:
assert
csvStr
==
csvFile
.
read
()
assert
csvStr
==
csvFile
.
read
()
try
:
try
:
os
.
remove
(
"
output.xlsx
"
)
os
.
remove
(
"
output.xlsx
"
)
...
...
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