On 2017-02-14 15:54, Michael Orlitzky wrote:
I have a few thousand failing doctests like that where I can't simply
remove the __init__.py file.

Adding __init__.py has specific semantics in Python: it means that your directory (which was a random bunch of Python files) is now a package. For a package, your imports have to be explicit.

So you need to add the import explicitly. The problem is that this import only works if the root of your package is in sys.path. And in general, there is no reason why it should be.

I'm not sure whether to call this a bug or feature... one could argue that "sage -t" should try to find the root of the current package and add that to sys.path. But one could also argue that adding the directory to sys.path should be done explicitly.

--
You received this message because you are subscribed to the Google Groups 
"sage-devel" 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 https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to