Re: [Tutor] How to write tests for main() function that does not return anything

2016-02-03 Thread Ben Finney
Steven D'Aprano writes: > I think the right answer is that testing main() is *not* a unit test, > it's an integration test. You're testing that the application as a > whole works the way you expect, rather than testing individual units > of the application (functions, class, methods, modules). A

Re: [Tutor] How to write tests for main() function that does not return anything

2016-02-03 Thread Steven D'Aprano
On Tue, Feb 02, 2016 at 10:46:04AM +, Pedro Miguel wrote: > Hi guys, I'm trying to test the code in the main() but I'm a bit > unsure how to go about it since I'm not passing any arguments or even > returning anything other then logging. For the purposes of the example > I've shortened the

Re: [Tutor] How to write tests for main() function that does not return anything

2016-02-03 Thread Peter Otten
Pedro Miguel wrote: > Hi guys, I'm trying to test the code in the main() but I'm a bit unsure > how to go about it since I'm not passing any arguments or even returning > anything other then logging. For the purposes of the example I've > shortened the tree statements in the function.. Can anyone