Skip to content

Commit

Permalink
tests: note that SharedState anonymous mmap doesnt work on linux
Browse files Browse the repository at this point in the history
ref #13
  • Loading branch information
nzjrs committed Dec 29, 2020
1 parent da92f07 commit cc239a2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions flyvr/common/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ def __init__(self, options, logger, where='', _start_rx_thread=True):

self._log = logging.getLogger('flyvr.common.SharedState%s' % (("(in='" + where + "')") if where else ''), )

if sys.platform == 'linux':
raise NotImplementedError('anonymous tagname based shared memory not supported on linux')

# noinspection PyTypeChecker
buf = mmap.mmap(-1,
ctypes.sizeof(SHMEMFlyVRState),
Expand Down
5 changes: 5 additions & 0 deletions tests/common/test_state.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
from flyvr.common import SharedState


def test_init():
ss = SharedState(None, None)

0 comments on commit cc239a2

Please sign in to comment.