Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
B
binary_c-python
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Izzard, Robert Dr (Maths & Physics)
binary_c-python
Commits
99cfab33
Commit
99cfab33
authored
3 years ago
by
dh00601
Browse files
Options
Downloads
Patches
Plain Diff
small changes to tests
parent
a595c509
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
badges/test_coverage.svg
+2
-2
2 additions, 2 deletions
badges/test_coverage.svg
binarycpython/tests/tests_population_extensions/test_version_info.py
+26
-0
26 additions, 0 deletions
...on/tests/tests_population_extensions/test_version_info.py
with
28 additions
and
2 deletions
badges/test_coverage.svg
+
2
−
2
View file @
99cfab33
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
<g
fill=
"#fff"
text-anchor=
"middle"
font-family=
"DejaVu Sans,Verdana,Geneva,sans-serif"
font-size=
"11"
>
<g
fill=
"#fff"
text-anchor=
"middle"
font-family=
"DejaVu Sans,Verdana,Geneva,sans-serif"
font-size=
"11"
>
<text
x=
"31.5"
y=
"15"
fill=
"#010101"
fill-opacity=
".3"
>
coverage
</text>
<text
x=
"31.5"
y=
"15"
fill=
"#010101"
fill-opacity=
".3"
>
coverage
</text>
<text
x=
"31.5"
y=
"14"
>
coverage
</text>
<text
x=
"31.5"
y=
"14"
>
coverage
</text>
<text
x=
"80"
y=
"15"
fill=
"#010101"
fill-opacity=
".3"
>
6
2
%
</text>
<text
x=
"80"
y=
"15"
fill=
"#010101"
fill-opacity=
".3"
>
6
3
%
</text>
<text
x=
"80"
y=
"14"
>
6
2
%
</text>
<text
x=
"80"
y=
"14"
>
6
3
%
</text>
</g>
</g>
</svg>
</svg>
This diff is collapsed.
Click to expand it.
binarycpython/tests/tests_population_extensions/test_version_info.py
+
26
−
0
View file @
99cfab33
...
@@ -4,6 +4,7 @@ Unit tests for the _version_info Population extension module
...
@@ -4,6 +4,7 @@ Unit tests for the _version_info Population extension module
TODO: minimum_stellar_mass
TODO: minimum_stellar_mass
"""
"""
import
os
import
unittest
import
unittest
from
binarycpython.utils.functions
import
(
from
binarycpython.utils.functions
import
(
...
@@ -98,6 +99,31 @@ class test_return_binary_c_version_info(unittest.TestCase):
...
@@ -98,6 +99,31 @@ class test_return_binary_c_version_info(unittest.TestCase):
self
.
assertIn
(
"
nucleosynthesis_sources
"
,
version_info_parsed
.
keys
())
self
.
assertIn
(
"
nucleosynthesis_sources
"
,
version_info_parsed
.
keys
())
self
.
assertIn
(
"
miscellaneous
"
,
version_info_parsed
.
keys
())
self
.
assertIn
(
"
miscellaneous
"
,
version_info_parsed
.
keys
())
def
test_envvar
(
self
):
with
Capturing
()
as
output
:
self
.
_test_envvar
()
def
_test_envvar
(
self
):
"""
Test for the parsed version info with a value already present
"""
os
.
environ
[
"
BINARY_C_MACRO_HEADER
"
]
=
'
macroxyz
'
# also tests the parse_version_info indirectly
version_info_parsed
=
self
.
_version_info_pop
.
return_binary_c_version_info
(
parsed
=
True
)
self
.
assertTrue
(
isinstance
(
version_info_parsed
,
dict
))
self
.
assertIn
(
"
isotopes
"
,
version_info_parsed
.
keys
())
self
.
assertIn
(
"
argpairs
"
,
version_info_parsed
.
keys
())
self
.
assertIn
(
"
ensembles
"
,
version_info_parsed
.
keys
())
self
.
assertIn
(
"
macros
"
,
version_info_parsed
.
keys
())
self
.
assertIn
(
"
elements
"
,
version_info_parsed
.
keys
())
self
.
assertIn
(
"
dt_limits
"
,
version_info_parsed
.
keys
())
self
.
assertIn
(
"
nucleosynthesis_sources
"
,
version_info_parsed
.
keys
())
self
.
assertIn
(
"
miscellaneous
"
,
version_info_parsed
.
keys
())
class
test_parse_binary_c_version_info
(
unittest
.
TestCase
):
class
test_parse_binary_c_version_info
(
unittest
.
TestCase
):
"""
"""
Unittests for function parse_binary_c_version_info
Unittests for function parse_binary_c_version_info
...
...
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