Bottom Page

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 Test Case Assertion Error
#1
Good evening,

I am running the unittest in Python for my code and I am getting errors/Failures. I am unsure how to fix it, or what the errors mean exactly. Can someone explain to me, please? I would really appreciate it.

One Failure is listed below:

def discover_path(self):
        self._src.endswith('.txt')
        src_type = 'path'
        with open('pride-and-prejudice.txt') as f:
            self._content = self._orig_content
Error:
FAIL: test_discover_path (__main__.TestTextAnalyzer) ---------------------------------------------------------------------- Traceback (most recent call last): File "<ipython-input-48-bce1ccf365eb>", line 16, in test_discover_path self.assertEqual(ta._src_type, 'path') AssertionError: 'discover' != 'path' - discover + path
Quote

Top Page

Messages In This Thread
Test Case Assertion Error - by moga2003 - Mar-07-2019, 03:39 AM
RE: Test Case Assertion Error - by ichabod801 - Mar-07-2019, 04:03 AM
RE: Test Case Assertion Error - by moga2003 - Mar-09-2019, 12:53 AM
RE: Test Case Assertion Error - by ichabod801 - Mar-09-2019, 02:56 AM
RE: Test Case Assertion Error - by moga2003 - Mar-09-2019, 06:00 PM
RE: Test Case Assertion Error - by ichabod801 - Mar-09-2019, 06:48 PM
RE: Test Case Assertion Error - by moga2003 - Mar-10-2019, 01:20 AM
RE: Test Case Assertion Error - by ichabod801 - Mar-10-2019, 01:46 AM
RE: Test Case Assertion Error - by moga2003 - Mar-11-2019, 03:04 AM
RE: Test Case Assertion Error - by ichabod801 - Mar-11-2019, 03:34 AM
RE: Test Case Assertion Error - by moga2003 - Mar-18-2019, 01:06 AM

Possibly Related Threads...
Thread Author Replies Views Last Post
  Assertion Error Mateoo 2 320 Jan-20-2019, 03:59 PM
Last Post: stullis
  error: (-215:Assertion failed) gkiller007 1 3,281 Jan-04-2019, 04:27 AM
Last Post: stullis
  pytest fixture in conftest.py thrown error while in the test file runs OzzieOzzum 1 749 Jul-31-2018, 12:12 PM
Last Post: OzzieOzzum
  Is this a normal/benign make test error when building python3.6 sofuego 2 1,063 Feb-12-2018, 12:32 AM
Last Post: sofuego

Forum Jump:


Users browsing this thread: 1 Guest(s)