Warning: Illegal string offset 'url' in /home/redho/public_html/forum/includes/page_header.php on line 381

Warning: Illegal string offset 'title' in /home/redho/public_html/forum/includes/page_header.php on line 381

Warning: Illegal string offset 'url' in /home/redho/public_html/forum/includes/page_header.php on line 381

Warning: Illegal string offset 'title' in /home/redho/public_html/forum/includes/page_header.php on line 381
Unit testing for exception - Python programming forum - Programming Forums
redho home | products | services

Programming Forums


Community for Java, PHP, Perl C, ASP and Python programmers
Tuesday 18 September 2018 21:02

Ask your IT question here

Unit testing for exception



 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Programming Forums -> Python programming forum
View previous topic :: View next topic  
Author Message
lolwut
Guest Programmer




Hi all, I'm currently writing a number of unit tests and have run into a bit of an issue. Those that are for methods that return false or positive are fine but I also need to test a number of methods that fail under certain conditions. Thing is, that is the desired response, they SHOULD be failing. Is there any way to catch an exception as an assert or should I just live with try/catch?
Reply with quote
 
Page 1 of 1
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Programming Forums -> Python programming forum


Dubai Forums - Expat Help | Vegan Forum | Java Programming | 3d Design Resources | 3d Forum | 3D Jobs | 3D Textures | Paris Forum | Europe Forum
Dubai Classifieds | Dubai Property | Jobs in Dubai | Free London Classifieds | Jobs in London UK

High Quality, Custom 3d animation and Web Design solutions Royal Quality Web Hosting Services Vegetarian and Animal Rights news

© 2018 RedHo