On 9/29/2013 5:28 PM, melw...@gmail.com wrote:
I was actually able to fix the code and run it, now i need to run tests but
idk what tests to write or how to even write it.
Two of us already gave you suggestions. I gave you a detailed re-write.
[snip hard to test code]
--
Terry Jan Reedy
--
I was actually able to fix the code and run it, now i need to run tests but
idk what tests to write or how to even write it.
[code]
import random
intro = 'I have chosen a number from 1-10'
request = 'Guess a number: '
responseHigh = "That's too high."
responseLow = "That's too low."
responseCo
On Thu, 26 Sep 2013 21:20:52 -0700, melwin9 wrote:
> I modified the guess.py file but am unable to run it,
What does that mean?
How do you try to run it?
What happens when you do?
--
Steven
--
https://mail.python.org/mailman/listinfo/python-list
I modified the guess.py file but am unable to run it, how do I go about
writing tests for this.
import random
guessesTaken = 0
number = random.randint(1, 10)
intro = 'I have chosen a number from 1-10'
request = 'Guess a number: '
responseHigh = "That's too high."
responseLow = "That's too lo
The question was more like what tests should I be writing, fine if I remove the
pexpect test I tried the test_guess & test_guesstoolow and still unable to get
it to work. So if i Want to ask for a number and typed a number which is at
random indicated by the top of the code, how do I proceed on
In article ,
melw...@gmail.com wrote:
> Initially I was shown pexpect, leaving that there, Can i make up 5 tests? I
> tried tests two different ways and no luck. What am I supposed to be writing
> up when I do a test and is there a particular way I can/should be referencing
> it back to its ma
Initially I was shown pexpect, leaving that there, Can i make up 5 tests? I
tried tests two different ways and no luck. What am I supposed to be writing up
when I do a test and is there a particular way I can/should be referencing it
back to its main file?
THis is what I have for the test_guess
In article <32f7bdcb-97e5-4a1c-a2c8-ab91e4052...@googlegroups.com>,
melw...@gmail.com wrote:
> Not sure How to proceed on with writing a few more tests with if statement to
> test if the value is low or high. I was told to try a command line switch
> like optparse to pass the number but not sur