Re: [Tutor] TDD: How to test input()?

2016-10-07 Thread Steven D'Aprano
On Fri, Oct 07, 2016 at 08:26:28PM -0500, boB Stepp wrote: > I think I have this figured out, but I want to be certain I am doing > it both correctly and in the preferred way. I have a need for a > get_input() function and have written my first test for this function > as follows: Testing code th

Re: [Tutor] Do not understand why I am getting "EOFError: EOF when reading a line".

2016-10-07 Thread boB Stepp
I think I now understand why I am getting this EOF exception. On Fri, Oct 7, 2016 at 10:16 PM, boB Stepp wrote: > My current get_input() function: > > == > def get_input(): > '''Get string input from the user and convert it to an integer. T

[Tutor] Do not understand why I am getting "EOFError: EOF when reading a line".

2016-10-07 Thread boB Stepp
My current get_input() function: == def get_input(): '''Get string input from the user and convert it to an integer. This integer is returned to the caller. :num_sides: Number of sides for the displayed grid.''' while True:

Re: [Tutor] TDD: How to test input()?

2016-10-07 Thread boB Stepp
Oops! On Fri, Oct 7, 2016 at 8:26 PM, boB Stepp wrote: > I think I have this figured out, but I want to be certain I am doing > it both correctly and in the preferred way. I have a need for a > get_input() function and have written my first test for this function > as follows: > > class TestGetI

[Tutor] TDD: How to test input()?

2016-10-07 Thread boB Stepp
I think I have this figured out, but I want to be certain I am doing it both correctly and in the preferred way. I have a need for a get_input() function and have written my first test for this function as follows: class TestGetInput(unittest.TestCase): '''Tests for the function get_input().'