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
@@ -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)
+