Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
libsonata
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
BlueBrain
libsonata
Commits
081cd510
Unverified
Commit
081cd510
authored
2 years ago
by
Michael Emiel Gevaert
Committed by
GitHub
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
make explicit tests for edges with libraries (#258)
parent
6ae2beb0
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
python/tests/test_population.py
+11
-0
11 additions, 0 deletions
python/tests/test_population.py
tests/test_edges.cpp
+6
-0
6 additions, 0 deletions
tests/test_edges.cpp
with
17 additions
and
0 deletions
python/tests/test_population.py
+
11
−
0
View file @
081cd510
...
...
@@ -271,6 +271,17 @@ class TestEdgePopulation(unittest.TestCase):
def
test_select_all
(
self
):
self
.
assertEqual
(
self
.
test_obj
.
select_all
().
flat_size
,
6
)
def
test_library_enumeration
(
self
):
self
.
assertEqual
(
self
.
test_obj
.
get_attribute
(
"
E-mapping-good
"
,
Selection
([(
0
,
1
),
(
2
,
3
)])).
tolist
(),
[
"
C
"
,
"
C
"
]
)
self
.
assertEqual
(
self
.
test_obj
.
get_enumeration
(
"
E-mapping-good
"
,
Selection
([(
0
,
1
),
(
2
,
3
)])).
tolist
(),
[
2
,
2
]
)
class
TestMisc
(
unittest
.
TestCase
):
def
test_path_ctor
(
self
):
...
...
This diff is collapsed.
Click to expand it.
tests/test_edges.cpp
+
6
−
0
View file @
081cd510
...
...
@@ -59,6 +59,12 @@ TEST_CASE("EdgePopulation", "[edges]") {
CHECK
(
population
.
connectingEdges
({
999
},
{
999
}).
empty
());
// duplicate node IDs are ignored; order of node IDs is not relevant
CHECK
(
population
.
connectingEdges
({
2
,
1
,
2
},
{
2
,
1
,
2
})
==
Selection
({{
0
,
4
}}));
CHECK
(
population
.
getAttribute
<
size_t
>
(
"E-mapping-good"
,
Selection
({{
0
,
1
},
{
2
,
3
}}))
==
std
::
vector
<
size_t
>
{
2
,
2
});
CHECK
(
population
.
getAttribute
<
std
::
string
>
(
"E-mapping-good"
,
Selection
({{
0
,
1
}}))
==
std
::
vector
<
std
::
string
>
{
"C"
});
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
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