projects
/
renesas-ra-flasher
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
setup.py: directory setup with pytest
[renesas-ra-flasher]
/
tests
/
test_parse.py
diff --git a/tests/test_parse.py
b/tests/test_parse.py
new file mode 100644
(file)
index 0000000..
d83e629
--- /dev/null
+++ b/
tests/test_parse.py
@@ -0,0
+1,8
@@
+from flasher.flasher import calc_sum
+import pytest
+
+def test_calc_sum():
+ assert calc_sum(0x12, ['0x00']) == (0, 0x2, 0xEC)
+ assert calc_sum(0x34, ['0x00']) == (0, 0x2, 0xCA)
+ assert calc_sum(0x00, ['0x00']) == (0, 0x02, 0xFE)
+