Hi, I have been looking for examples and searching the web site, but could not find anything concerning the following problem:
If you copy the following code snippet into a file say doctest.py #################################### def nounderscore(nn): """ EXAMPLES: sage: nounderscore(2) 4 """ return nn*nn def _underscore(nn): """ EXAMPLES: sage: _underscore(3) 9 """ return nn*nn ########################### and then run it: sage -t "doctest.py" ********************************************************************** File "/home/user/research/yyy/doctest.py", line 17: sage: _underscore(3) Exception raised: Traceback (most recent call last): File "/space/wstein/farm/sage-3.4.1/local/bin/ncadoctest.py", line 1231, in run_one_test self.run_one_example(test, example, filename, compileflags) File "/space/wstein/farm/sage-3.4.1/local/bin/sagedoctest.py", line 38, in run_one_example OrigDocTestRunner.run_one_example(self, test, example, filename, compileflags) File "/space/wstein/farm/sage-3.4.1/local/bin/ncadoctest.py", line 1172, in run_one_example compileflags, 1) in test.globs File "<doctest __main__.example_1[2]>", line 1, in <module> _underscore(Integer(3))###line 17: sage: _underscore(3) NameError: name '_underscore' is not defined ********************************************************************** 1 items had failures: 1 of 3 in __main__.example_1 ***Test Failed*** 1 failures. This means that you can either not have (semi)private functions in your code or any code submissions to sage will be automatically rejected due to the 100% doctest requirement, unless I am overlooking something silly. regards, Jens --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-devel@googlegroups.com To unsubscribe from this group, send email to sage-devel-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---