Skip to content

Commit

Permalink
Merge pull request #7 from hayabhay/tests
Browse files Browse the repository at this point in the history
Added extremely important tests to make this puppy production ready
  • Loading branch information
jdagdelen committed Apr 18, 2023
2 parents f528e45 + 8569132 commit ce0d6b1
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
2 changes: 2 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
numpy
pytest
openai
Empty file added tests/__init__.py
Empty file.
14 changes: 14 additions & 0 deletions tests/test_galaxy_brain_math_shit.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import numpy as np
from hyperdb import euclidean_metric

# Test totally written by me and not gpt/co-pilot
def test_euclid_bros_metric():
data_vectors = np.array([[1, 2, 3], [4, 5, 6], [7, 8, 9]])
query_vector = np.array([1, 1, 1])
result = euclidean_metric(data_vectors, query_vector)

# All important test to see if shapes are based
try:
assert result.shape == (3,)
except AssertionError:
raise AssertionError("Oh my god, you killed Euclid! You bas-turd!")

0 comments on commit ce0d6b1

Please sign in to comment.