Skip to content

Commit

Permalink
make testcase filepath general
Browse files Browse the repository at this point in the history
  • Loading branch information
kingslayerrq committed Dec 1, 2023
1 parent e430776 commit b3e07ab
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions machine-learning-client/tests/ml_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,19 @@
tests for machine-learning-client
"""
from machine_learning_client import ML

import os

class Tests:
"""Tests class for ml_tests.py"""

def test_audio_text_conversion(self):
"""testing audio_to_text function in ML with valid audiofile as input"""
PROJECT_ROOT = os.path.abspath(os.path.join(os.path.dirname(__file__), ".."))
tests_path = "tests"
file_name = "richard.aiff"
file_path = os.path.join(PROJECT_ROOT, tests_path, file_name)
print(file_path)
actual = ML.audio_to_text(
self,
r"C:\Users\Administrator\Desktop\NYU_Undergrad\SoftwareEngineering"
r"\4-containerized-app-exercise-rizzballs\machine-learning-client\tests\richard.aiff",
self, file_path
)
assert isinstance(
actual, str
Expand Down

0 comments on commit b3e07ab

Please sign in to comment.