Throw an exception on invalid BufferView instantiation
Also adjust tests to skip mmap under Python 2.
This commit is contained in:
@@ -6,6 +6,7 @@ import test_regression
|
||||
import tempfile
|
||||
import pickle
|
||||
import mmap
|
||||
import sys
|
||||
|
||||
this_dir = os.path.dirname(__file__)
|
||||
|
||||
@@ -41,6 +42,7 @@ def test_roundtrip_bytes(all_types):
|
||||
msg = all_types.TestAllTypes.from_bytes(message_bytes)
|
||||
test_regression.check_all_types(msg)
|
||||
|
||||
@pytest.mark.skipif(sys.version_info.major < 3, reason="mmap doesn't implement the buffer interface under python 2.")
|
||||
def test_roundtrip_bytes_mmap(all_types):
|
||||
msg = all_types.TestAllTypes.new_message()
|
||||
test_regression.init_all_types(msg)
|
||||
|
||||
Reference in New Issue
Block a user