[TIP] testing multiple projects in the same repository

Dan Helfman dan at energysavvy.com
Thu May 14 12:55:16 PDT 2015


I have two related Python projects in the same repository, each with their
own setup.py and tox.ini. Let's say projects A and project B, such that
project B depends directly on project A. When making a breaking change in
project A's "API", I will typically fix project B to consume that change,
and do all of that in one changeset.

My question is: What is the best practice with tox or in general for
setting up a test environment that uses the local modified working copy for
multiple packages, not just the package under test? I am aware of the tip
about accessing artifacts between multiple tox runs
<https://tox.readthedocs.org/en/latest/example/general.html#access-package-artifacts-between-multiple-tox-runs>,
but that won't work for a couple of reasons:

   1. It seems very dependent on the order in which tox is run on the
   various projects. For instance, if I happen to run tox on project B without
   running tox on project A first, the distshare approach won't work.
   2. It doesn't appear to support wheels right now, which is how I'm
   packaging my projects.

The best solution I've come up with thus far is to manually add a "pip
install --editable" invocation to install project A editable within project
B's tox.ini "commands" section. But that seems like a hack. And it's
duplicative of project A's existing entry in project B's requirements.txt.

How do others generally solve this type of problem?


Thanks,

Dan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.idyll.org/pipermail/testing-in-python/attachments/20150514/bcfb5bac/attachment.htm>


More information about the testing-in-python mailing list