简体   繁体   中英

How do I run a twisted trial in Windows?

I'm new to Python, Twisted , and Trial... and for Windows users the setup process isn't very clear. Right now, I have Python 2.7 installed, along with Twisted. From the Python GUI, I can run the reactor, so I'm convinced things are set up OK. But I can't figure out how to run trial from the command line to run my unit tests. I don't see an executable anywhere for it.

This post gives me a hint that a patch needs to be installed in the twisted setup.py ... Although I don't know where that file is located. The comments mention I should just use the Twisted cmd shell, which again, I don't know where it is at.

Any pointers would be appreciated.

There's nothing terribly special about running trial on Windows. Run it like any Python script:

C:\Python27\python.exe C:\Python27\Scripts\trial.py [additional arguments]

Or if you have.py associated with a Python interpreter already:

C:\Python27\Scripts\trial.py [additional arguments]

Or if you have the Python Scripts folder in your %PATH% already:

trial.py [additional arguments]

Or if you have that folder on your %PATH% and '.py' is in your %PATHEXT% already:

trial [additional arguments]

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM