#6379: #2513 made R.py doctest fail for non-english locale
-------------------------+--------------------------------------------------
Reporter: GeorgSWeber | Owner: was
Type: defect | Status: new
Priority: critical | Milestone: sage-4.1
Component: interfaces | Keywords:
Reviewer: | Author:
Merged: |
-------------------------+--------------------------------------------------
In ticket #276, the LANG environment variable was set in sage-env (to
en_US.UTF-8) and in ticket #2513, this was undone. On my box, the
following doctest failure was a consequence:
{{{
sage -t -long "devel/sage/sage/interfaces/r.py"
**********************************************************************
File "/Users/Shared/sage/sage-4.0.2/devel/sage/sage/interfaces/r.py", line
554:
sage: r.library('foobar')
Expected:
Traceback (most recent call last):
...
ImportError: there is no package called 'foobar'
Got nothing
**********************************************************************
File "/Users/Shared/sage/sage-4.0.2/devel/sage/sage/interfaces/r.py", line
840:
sage: r.completions('tes')
Expected:
['testPlatformEquivalence', 'testVirtual']
Got:
['testPlatformEquivalence', 'testPlatformEquivalence', 'testVirtual',
'testVirtual']
**********************************************************************
2 items had failures:
1 of 5 in __main__.example_17
1 of 3 in __main__.example_34
***Test Failed*** 2 failures.
For whitespace errors, see the file
/Users/Shared/sage/sage-4.0.2/tmp/.doctest_r.py
[6.3 s]
}}}
I have *none* of the usual "locale" variables set (LANG, LC_ALL, ...) but
nevertheless R is clever enough to detect that I might want read its
messages in german. (It's using some Mac OS feature, I think.) But
unfortunately the Sage code did parse for english key-words in the R
messages.
Anyway, the above doctest failure could be triggered by anyone by issuing
e.g. "export LANG=de_DE.UTF-8" just before running the doctest.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/6379>
Sage <http://sagemath.org/>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en
-~----------~----~----~----~------~----~------~--~---