Skip to content

Commit 34a39f9

Browse files
authored
Merge pull request #5 from pazzarpj/bugfix/tests
Updated tests and instructions so they work
2 parents c5085b7 + 74c197c commit 34a39f9

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

README.md

+8
Original file line numberDiff line numberDiff line change
@@ -353,6 +353,14 @@ Install the test requirements with
353353
```bash
354354
pip install -r requirements-test.txt
355355
```
356+
Install the package in editable mode
357+
```bash
358+
pip install -e .
359+
```
360+
Run the tests
361+
```bash
362+
pytest
363+
```
356364

357365
## Check out the docs
358366

test/test_basic.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def add_ints(a: int, b: int) -> int:
2424
}
2525
MP_DEFINE_CONST_FUN_OBJ_2(example_add_ints_obj, example_add_ints);""".splitlines()
2626

27-
call_lines = ustubby.stub_function(add_ints)
27+
call_lines = ustubby.stub_function(add_ints).splitlines()
2828
for index, line in enumerate(call_lines):
2929
assert line == lines[index]
3030

@@ -70,6 +70,6 @@ def readfrom_mem(addr: int = 0, memaddr: int = 0, arg: object = None, *, addrsiz
7070
return mp_obj_new_str(<ret_val_ptr>, <ret_val_len>);
7171
}
7272
MP_DEFINE_CONST_FUN_OBJ_KW(example_readfrom_mem_obj, 1, example_readfrom_mem);""".splitlines()
73-
call_lines = ustubby.stub_function(readfrom_mem)
73+
call_lines = ustubby.stub_function(readfrom_mem).splitlines()
7474
for index, line in enumerate(call_lines):
7575
assert line == lines[index]

0 commit comments

Comments
 (0)