Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unittest plugin does not show results #165

Open
wanderson42 opened this issue Dec 22, 2021 · 0 comments
Open

unittest plugin does not show results #165

wanderson42 opened this issue Dec 22, 2021 · 0 comments

Comments

@wanderson42
Copy link

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 _________________________

def test_maximo4():
  assert maximo(1,100) == 1 # running a propsital wrong test

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:

  • Spyder version: 4.1.5
  • Version of spyder-unittest plugin: 0.4.1
  • Installation method for Spyder and the unittest plugin: Anaconda
  • Python version: 3.8.5
  • Testing framework used: py.test
  • Testing framework version: 6.1.1
  • Operating system: Linux (elementary OS)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant