I learned how to do this on Unix lab computers, and none of the commands are working ? I found other stack overflow questions about modifying the path directory and when i type python in Cmd, the python program starts to work. However, I don't know how to open a file i want to test ? is the command still -m doctest file_to_be_tested ?
Also, do I have to go to that point in my directory before I can open python ?
Somethings that i have tried are: 1) opening python first, and then going to where my file is, and then trying the -m doctest command 2) going to the directory place first, and then opening python, then the -m doctest command
I am pretty confused. If it makes a difference, I am using sublime as a text editor
Somethings that i have tried are: 1) opening python first, and then going to where my file is, and then trying the -m doctest command 2) going to the directory place first, and then opening python, then the -m doctest command
-m is a command-line switch, it has no meaning inside the interpreter.
You need to go to the directory that contains the file you want to test and run:
> python -m doctest file-to-test
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With