I would just add it as another test that gets run with setup.py test
(which calls some run_all_tests function). For Travis, you should run
it separately, before it gets installed. Installing is important
because we want to test that things get installed correctly.

Alternately, your solution 3 sounds fine to me.  I'm not a huge fan of
installing test functions into user-space.

Aaron Meurer

On Thu, Nov 14, 2013 at 5:22 PM, Joachim Durchholz <[email protected]> wrote:
> That's because Travis installs SymPy as a regular Python module, and you
> can't have a bin/ directory there since that might collide with other Python
> modules.
>
> I'm having a really big problem with that: I have a unit test
> utilities/tests/test_module_imports.py that needs to call the script
> bin/diagnose_imports.
> There are several elements in this situation that could be changed; I don't
> know which one would be best, so I need feedback.
>
> Solution 1: Don't install SymPy as a Python module. Leave SymPy in whatever
> directory Travis downloads from github and run the tests from there; that's
> what developers do anyway.
>
> Solution 2: Somehow tell the tests where the binaries (such as isympy) are
> installed. Install the diagnostic script alongside isympy.
> This allows end users to run the tests as well, so I'd prefer that approach;
> I just don't know whether it's feasible.
>
> Solution 3: Move the diagnostic code into the sympy/utilities directory. Let
> both unit test and bin/diagnose_imports import that module.
> Make sure that utilities/__init__.py does NOT import the new diagnostic
> Python code since it is not supposed to be part of SymPy.
> On the plus side, this does not require any changes to SymPy's
> infrastructure.
> On the minus side, I don't really like adding a merely diagnostic module
> outside a test/ directory. (Well, maybe the real problem is that bin/
> contains both test and production code.)
>
> Feedback appreciated.
>
> --
> You received this message because you are subscribed to the Google Groups
> "sympy" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/sympy.
> For more options, visit https://groups.google.com/groups/opt_out.

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sympy.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to