Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Test Case Assertion Error
#4
You need to set _src_type based on _src, but you're not doing that. You do need an if/elif/else. The clauses you need are on lines 30 and 39. You probably need to read in the content as well. I'm not sure why you have the test cases in your code (line 32) and sometimes overriding any other input (line 41, where you should be using self._src). Also line 42 needs to read the content from the file. Currently it is setting self._content to None.
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
Reply


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
  unittest generates multiple files for each of my test case, how do I change to 1 file zsousa 0 965 Feb-15-2023, 05:34 PM
Last Post: zsousa
  Switch case or match case? Frankduc 9 4,518 Jan-20-2022, 01:56 PM
Last Post: Frankduc
  How to test and import a model form computer to test accuracy using Sklearn library Anldra12 6 3,130 Jul-03-2021, 10:07 AM
Last Post: Anldra12
  How to write test cases for a init function by Unit test in python? binhduonggttn 2 3,121 Feb-24-2020, 12:06 PM
Last Post: Larz60+
  How to write test cases by Unit test for database configuration file? binhduonggttn 0 2,558 Feb-18-2020, 08:03 AM
Last Post: binhduonggttn
  opencv on mac: Assertion Failed RandomCoder 0 1,679 Feb-16-2020, 06:17 PM
Last Post: RandomCoder
  Assertion Error Mateoo 2 2,171 Jan-20-2019, 03:59 PM
Last Post: stullis
  error: (-215:Assertion failed) gkiller007 1 8,681 Jan-04-2019, 04:27 AM
Last Post: stullis
  pytest fixture in conftest.py thrown error while in the test file runs OzzieOzzum 1 3,979 Jul-31-2018, 12:12 PM
Last Post: OzzieOzzum
  Is this a normal/benign make test error when building python3.6 sofuego 2 3,519 Feb-12-2018, 12:32 AM
Last Post: sofuego

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020