- Fix python version in docs - Made a note on which CRC32 we're using in the example - Removed a redundant parameter
21 lines
591 B
Python
21 lines
591 B
Python
import pytest
|
|
|
|
from ..helpers import Suite
|
|
|
|
|
|
@pytest.mark.slow_integration_test
|
|
def test_index():
|
|
with open('examples/buffer.py', 'r', encoding='ASCII') as fil:
|
|
code_py = "\n" + fil.read()
|
|
|
|
result = Suite(code_py).run_code(b'Hello, world!', 5, func_name='index')
|
|
assert 44 == result.returned_value
|
|
|
|
@pytest.mark.slow_integration_test
|
|
def test_length():
|
|
with open('examples/buffer.py', 'r', encoding='ASCII') as fil:
|
|
code_py = "\n" + fil.read()
|
|
|
|
result = Suite(code_py).run_code(b'Hello, world!', func_name='length')
|
|
assert 13 == result.returned_value
|