Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
pystencils
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
Model registry
Operate
Environments
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pycodegen
pystencils
Merge requests
!298
Fix: Version string test case
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Fix: Version string test case
holzer-master-patch-17736
into
master
Overview
0
Commits
2
Pipelines
2
Changes
1
Merged
Markus Holzer
requested to merge
holzer-master-patch-17736
into
master
2 years ago
Overview
0
Commits
2
Pipelines
2
Changes
1
Expand
0
0
Merge request reports
Viewing commit
3179245d
Prev
Next
Show latest version
1 file
+
5
−
4
Side-by-side
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
3179245d
Fix test version string
· 3179245d
Markus Holzer
authored
2 years ago
pystencils_tests/test_version_string.py
+
5
−
4
Options
import
pystencils
as
ps
import
lbmpy
def
test_version_string
():
def
test_version_string
():
version
=
ps
.
__version__
version
=
lbmpy
.
__version__
print
(
version
)
print
(
version
)
numeric_version
=
[
int
(
x
,
10
)
for
x
in
version
.
split
(
'
.
'
)[
0
:
2
]]
numeric_version
=
[
int
(
x
,
10
)
for
x
in
version
.
split
(
'
.
'
)[
0
:
1
]]
test_version
=
sum
(
x
*
(
100
**
i
)
for
i
,
x
in
enumerate
(
numeric_version
))
test_version
=
sum
(
x
*
(
100
**
i
)
for
i
,
x
in
enumerate
(
numeric_version
))
assert
test_version
>=
200
assert
test_version
>=
1
\ No newline at end of file
Loading