Re: Canonical way to run trial with Python3

Mark Williams <[email protected]>
Newsgroups gmane.comp.python.twisted
Message-ID <1526697607.293439.1377437352.35DC1E50@webmail.messagingengine.com>
On Thu, May 17, 2018, at 11:51 PM, Werner Thie wrote:
> Aloha
> 
> Are there any suggestions on how to run trial on a given package to be
> ported to Python 3
>

Use an editable installation.  trial won't automatically find unported modules in an editable installation, but you run it against any package in src/twisted by specifying the fully-qualified pathname.

Perform an editable install of Twisted in a virtual environment within which you'll run trial:

$ mkvirtualenv -p /path/to/python3 /path/to/venv3/
$ /path/to/venv3/bin/pip install -e /path/to/twisted/checkout

Now that virtual environment's trial can test something that isn't ported to Python 3:

$ /path/to/venv3/bin/trial twisted.news
# Lots of failures 

Don't forget to remove the ported package and its tests from notPortedModules when you're done:

https://github.com/twisted/twisted/blob/2b61992249d7c628a2685456e5c1608d75657979/src/twisted/python/_setup.py#L380-L416

Good luck and thanks for your interest in porting more of Twisted to Python 3!

-- 
  Mark Williams
  [email protected]

_______________________________________________
Twisted-Python mailing list
[email protected]
https://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.