mirror of
https://github.com/ggerganov/ggwave.git
synced 2026-02-06 16:47:59 +08:00
Add python bindings + package (#10)
* wip : python package * wip : minor fixes * wip : upload package to main pypi * wip : initial text encoding * wip : extending C api * wip : use map of global instances * wip : added decode functionality * update main README
This commit is contained in:
16
bindings/python/test.py
Normal file
16
bindings/python/test.py
Normal file
@@ -0,0 +1,16 @@
|
||||
import sys
|
||||
import ggwave
|
||||
|
||||
testFailed = False
|
||||
|
||||
n, samples = ggwave.encode("hello python")
|
||||
|
||||
if not (samples and n > 1024):
|
||||
testFailed = True
|
||||
|
||||
if testFailed:
|
||||
print("Some of the tests failed!")
|
||||
else:
|
||||
print("All tests passed!")
|
||||
|
||||
sys.exit(testFailed)
|
||||
Reference in New Issue
Block a user