Quando Rodei o
def test_nao_deve_permitir_propor_um_lance_em_ordem_decrescente(self):
with self.assertRaises(ValueError):
ryu = Usuario('Ryu')
lance_do_ryu = Lance(ryu, 100.0)
self.leilao.propoe(self.lance_do_alexandre)
self.leilao.propoe(lance_do_ryu)
aconteceu este erro:
C:\Users\Lucas\Documents\testes-python-projeto-inicial\venv\Scripts\python.exe "C:\Users\Lucas\Nova pasta\PyCharm Community Edition 2020.3\plugins\python-ce\helpers\pycharm\_jb_unittest_runner.py" --target test_leilao.TestLeilao.test_nao_deve_permitir_propor_um_lance_em_ordem_decrescente
Testing started at 15:41 ...
Launching unittests with arguments python -m unittest test_leilao.TestLeilao.test_nao_deve_permitir_propor_um_lance_em_ordem_decrescente in C:\Users\Meg\Documents\testes-python-projeto-inicial\src\leilao
Failure
Traceback (most recent call last):
File "C:\Users\Meg\AppData\Local\Programs\Python\Python39\lib\unittest\case.py", line 59, in testPartExecutor
yield
File "C:\Users\Meg\AppData\Local\Programs\Python\Python39\lib\unittest\case.py", line 593, in run
self._callTestMethod(testMethod)
File "C:\Users\Meg\AppData\Local\Programs\Python\Python39\lib\unittest\case.py", line 550, in _callTestMethod
method()
File "C:\Users\Meg\Documents\testes-python-projeto-inicial\src\leilao\test_leilao.py", line 32, in test_nao_deve_permitir_propor_um_lance_em_ordem_decrescente
self.leilao.propoe(lance_do_ryu)
File "C:\Users\Meg\AppData\Local\Programs\Python\Python39\lib\unittest\case.py", line 226, in __exit__
self._raiseFailure("{} not raised".format(exc_name))
File "C:\Users\Meg\AppData\Local\Programs\Python\Python39\lib\unittest\case.py", line 163, in _raiseFailure
raise self.test_case.failureException(msg)
AssertionError: ValueError not raised
Assertion failed
Ran 1 test in 0.020s
FAILED (failures=1)
Process finished with exit code 1
Assertion failed
Assertion failed
o que poderia ser? desde já obrigado!