pytest-check icon indicating copy to clipboard operation
pytest-check copied to clipboard

why I am geeting no attribute 'equal' error?

Open vbpatel73 opened this issue 2 years ago • 1 comments

Traceback (most recent call last): File "c:/projects/xyz/1.py", line 63, in test() File "c:/projects/xyz/1.py", line 62, in test print(check.equal(5,6)) AttributeError: 'CheckContextManager' object has no attribute 'equal'

vbpatel73 avatar Sep 01 '22 18:09 vbpatel73

I'm sorry you're having trouble.

Could you include an example test file that shows the error? And please include the full output, including the pytest header with versions.

Here's one example, test_foo.py:

def test_foo(check):
  check.equal(5,6)

With this output:

$ pytest test_foo.py
======================== test session starts =========================
platform darwin -- Python 3.10.3, pytest-7.1.2, pluggy-1.0.0
rootdir: /Users/okken/projects/foo
plugins: check-1.0.9
collected 1 item                                                     

test_foo.py F                                                  [100%]

============================== FAILURES ==============================
______________________________ test_foo ______________________________
FAILURE: 
assert 5 == 6
test_foo.py:2 in test_foo() -> check.equal(5,6)
------------------------------------------------------------
Failed Checks: 1
====================== short test summary info =======================
FAILED test_foo.py::test_foo
========================= 1 failed in 0.03s ==========================

okken avatar Sep 01 '22 19:09 okken

@vbpatel73 Is this still an issue for you?

okken avatar Sep 26 '22 02:09 okken

no response from filer

okken avatar Sep 29 '22 03:09 okken