On Sat, Nov 16, 2013 at 10:18 AM, Aaron Meurer <[email protected]> wrote:
> On Fri, Nov 15, 2013 at 1:28 PM, Joachim Durchholz <[email protected]> wrote:
>> Am 15.11.2013 18:25, schrieb Aaron Meurer:
>>
>>> Reading through your original email again, I think the best solution
>>> would be to move the code from bin/diagnose_imports to the library
>>> somewhere (utilities/diagnose.py or something, or even
>>> external/importtools.py). Then bin/diagnose_imports will be a simple
>>> wrapper. Your unit test could then just import that file and go.
>>
>>
>> That's the conclusion I reached at after some more thinking, too.
>>
>>
>>> I
>>>
>>> suggested importtools.py btw because that file is guaranteed to not
>>> import SymPy (although I just noticed that it doesn't say that at the
>>> top of the file, so that should be fixed). I forgot the exact reason
>>> for that, but I seem to remember it was a good one. A separate file in
>>> utilities could also easily have this.
>>
>>
>> diagnose_imports is not needed for the operation of SymPy itself, it's
>> purely a developer tool. So it should go to some module that's not part of
>> the installation.
>
> Sure, but you could say that about all the test files.  But I think
> it's good to include them, so that anyone can run test() and check
> that their SymPy is working.

That's right --- it's a common way to test libraries by doing:

import X
X.test()

after installing them. This works for X=sympy, numpy, scipy, matplotlib, ...
So we should keep supporting this approach.

Ondrej

>
>> I'd like to have it (and the unit test) in the module where it belongs;
>> parallel to test_code_quality.py seemed right to me.
>> Seems like the unit test could stay in utilities/test/test_imports.py and
>> the common code for command-line tools and unit test should go to, say,
>> utilities/test/diagnose_imports.py - I think the unit tests don't pick up
>> files that don't have "test" in their name, do they?
>
> No, only files that start with test_.
>
> Aaron Meurer
>
>>
>>
>> --
>> 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.

-- 
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