Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
crazyflie-lib-python
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
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
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
Lukas Wegmann
crazyflie-lib-python
Commits
a04deccf
Commit
a04deccf
authored
6 years ago
by
Kristoffer Richardsson
Browse files
Options
Downloads
Patches
Plain Diff
#119 Added system test for memory mapping operations on reused Crazyflie object
parent
d142a29d
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
sys_test/swarm_test_rig/test_memory_map.py
+14
-0
14 additions, 0 deletions
sys_test/swarm_test_rig/test_memory_map.py
with
14 additions
and
0 deletions
sys_test/swarm_test_rig/test_memory_map.py
+
14
−
0
View file @
a04deccf
...
@@ -60,6 +60,20 @@ class TestMemoryMapping(unittest.TestCase):
...
@@ -60,6 +60,20 @@ class TestMemoryMapping(unittest.TestCase):
with
Swarm
(
uris
,
factory
=
factory
)
as
swarm
:
with
Swarm
(
uris
,
factory
=
factory
)
as
swarm
:
swarm
.
parallel_safe
(
self
.
assert_memory_mapping
)
swarm
.
parallel_safe
(
self
.
assert_memory_mapping
)
def
test_memory_mapping_with_reuse_of_cf_object
(
self
):
# Fixture
uri
=
self
.
test_rig_support
.
all_uris
[
0
]
self
.
test_rig_support
.
restart_devices
([
uri
])
cf
=
Crazyflie
(
rw_cache
=
'
./cache
'
)
# Test and Assert
for
connections
in
range
(
10
):
with
SyncCrazyflie
(
uri
,
cf
=
cf
)
as
scf
:
for
mem_ops
in
range
(
5
):
self
.
assert_memory_mapping
(
scf
)
# Utils
def
assert_memory_mapping
(
self
,
scf
):
def
assert_memory_mapping
(
self
,
scf
):
mems
=
scf
.
cf
.
mem
.
get_mems
(
MemoryElement
.
TYPE_MEMORY_TESTER
)
mems
=
scf
.
cf
.
mem
.
get_mems
(
MemoryElement
.
TYPE_MEMORY_TESTER
)
count
=
len
(
mems
)
count
=
len
(
mems
)
...
...
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