We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e4b466c commit 1ec3493Copy full SHA for 1ec3493
tests/test_ngtpy.py
@@ -0,0 +1,20 @@
1
+import pytest
2
+
3
+import ngtpy
4
5
6
+def new_index(path, dimension):
7
+ path_str = str(path)
8
+ index = ngtpy.create(path_str, dimension)
9
+ return ngtpy.Index(path_str)
10
11
12
+def test_insert(tmp_path):
13
+ index = new_index(tmp_path, dimension=3)
14
15
+ v = [2, 3, 5]
16
+ v_id = index.insert(v)
17
18
+ result = index.get_object(v_id)
19
20
+ assert result == v
tox.ini
@@ -0,0 +1,8 @@
+[tox]
+envlist = py39
+isolated_build = true
+[testenv]
+deps = pytest
+commands =
+ pytest
0 commit comments