Skip to content

Commit

Permalink
Merge pull request #5 from pazzarpj/bugfix/tests
Browse files Browse the repository at this point in the history
Updated tests and instructions so they work
  • Loading branch information
pazzarpj authored Aug 6, 2019
2 parents c5085b7 + 74c197c commit 34a39f9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,14 @@ Install the test requirements with
```bash
pip install -r requirements-test.txt
```
Install the package in editable mode
```bash
pip install -e .
```
Run the tests
```bash
pytest
```

## Check out the docs

Expand Down
4 changes: 2 additions & 2 deletions test/test_basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def add_ints(a: int, b: int) -> int:
}
MP_DEFINE_CONST_FUN_OBJ_2(example_add_ints_obj, example_add_ints);""".splitlines()

call_lines = ustubby.stub_function(add_ints)
call_lines = ustubby.stub_function(add_ints).splitlines()
for index, line in enumerate(call_lines):
assert line == lines[index]

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

0 comments on commit 34a39f9

Please sign in to comment.