Spaces:
Sleeping
Sleeping
Sanjeeth commited on
Delete test-file.py
Browse files- test-file.py +0 -26
test-file.py
DELETED
|
@@ -1,26 +0,0 @@
|
|
| 1 |
-
import pytest
|
| 2 |
-
from app import translate
|
| 3 |
-
|
| 4 |
-
def test_translation_to_french():
|
| 5 |
-
print("Starting French translation test")
|
| 6 |
-
result = translate("Hello", "French")
|
| 7 |
-
print(f"French translation result: {result}")
|
| 8 |
-
assert result.lower() in ["bonjour", "salut"], f"Expected 'Bonjour' or 'Salut', but got {result}"
|
| 9 |
-
|
| 10 |
-
def test_translation_to_german():
|
| 11 |
-
print("Starting German translation test")
|
| 12 |
-
result = translate("Hello", "German")
|
| 13 |
-
print(f"German translation result: {result}")
|
| 14 |
-
assert result.lower() == "hallo", f"Expected 'Hallo', but got {result}"
|
| 15 |
-
|
| 16 |
-
def test_translation_to_romanian():
|
| 17 |
-
print("Starting Romanian translation test")
|
| 18 |
-
result = translate("Hello", "Romanian")
|
| 19 |
-
print(f"Romanian translation result: {result}")
|
| 20 |
-
assert result.lower() == "salut", f"Expected 'Salut', but got {result}"
|
| 21 |
-
|
| 22 |
-
def test_unsupported_language():
|
| 23 |
-
print("Starting unsupported language test")
|
| 24 |
-
result = translate("Hello", "Spanish")
|
| 25 |
-
print(f"Unsupported language result: {result}")
|
| 26 |
-
assert result == "Sorry, this language is not supported."
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|