You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I implemented a simple Conditional Statement:
##################################
def maximo (valor, valor2):
if valor > valor2:
return valor
else:
return valor2
def test_maximo1():
assert maximo(2,4) == 4
def test_maximo2():
assert maximo(-1,-5) == -1
def test_maximo3():
assert maximo(0,-10) == 0
def test_maximo4():
assert maximo(1,100) == 1 # running a propsital wrong test
##################################
Run tests exhibit: "No results to show."
I implemented the same test successfully via linux terminal:
Description of your problem
I implemented a simple Conditional Statement:
##################################
def maximo (valor, valor2):
if valor > valor2:
return valor
else:
return valor2
def test_maximo1():
assert maximo(2,4) == 4
def test_maximo2():
assert maximo(-1,-5) == -1
def test_maximo3():
assert maximo(0,-10) == 0
def test_maximo4():
assert maximo(1,100) == 1 # running a propsital wrong test
##################################
Run tests exhibit: "No results to show."
I implemented the same test successfully via linux terminal:
(base) wander@X555UB:~/python-ime/test-folder$ py.test maximo_2.py
=================== test session starts ======================
platform linux -- Python 3.8.5, pytest-6.1.1, py-1.9.0, pluggy-0.13.1
rootdir: /home/wander/python-ime/test-folder
collected 4 items
maximo_2.py ...F [100%]
======================== FAILURES =========================
______________________ test_maximo4 _________________________
E assert 100 == 1
E + where 100 = maximo(1, 100)
maximo_2.py:26: AssertionError
=================== short test summary info =====================
FAILED maximo_2.py::test_maximo4 - assert 100 == 1
================== 1 failed, 3 passed in 0.08s ==================
Key versions and other information:
The text was updated successfully, but these errors were encountered: