[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Whats going on with utf8_tests.py?

From: Philip Martin <philip_at_codematters.co.uk>
Date: 2005-01-20 23:33:08 CET

utf8_tests.py looks a bit dodgy. At present I get

$ .../utf8_tests.py list
Test # Mode Test Description
------ ----- ----------------
  1 SKIP conversion of paths and logs to/from utf8

Looking at the code it appears that I need an 8859-1 locale but

$ LANG=en_GB .../utf8_tests.py list
Test # Mode Test Description
------ ----- ----------------
  1 SKIP conversion of paths and logs to/from utf8

If I modify the code as follows

Index: subversion/tests/clients/cmdline/utf8_tests.py
===================================================================
--- subversion/tests/clients/cmdline/utf8_tests.py (revision 12801)
+++ subversion/tests/clients/cmdline/utf8_tests.py (working copy)
@@ -98,6 +98,7 @@
 
 
 # list all tests here, starting with None:
+locale.setlocale(locale.LC_ALL, '')
 test_list = [ None,
               Skip(basic_utf8_conversion, locale.getlocale()[1] != 'ISO8859-1')
              ]

I get

$ LANG=en_GB .../utf8_tests.py list
Test # Mode Test Description
------ ----- ----------------
  1 conversion of paths and logs to/from utf8

which looks more promising, but it now fails because it tries to use a
locale I don't have

$ LANG=en_GB .../utf8_tests.py
UNEXPECTED EXCEPTION:
Traceback (most recent call last):
  File "/home/pm/sw/subversion/svn/subversion/tests/clients/cmdline/svntest/testcase.py", line 105, in run
    rc = apply(self.pred.func, args)
  File "/home/pm/sw/subversion/svn/subversion/tests/clients/cmdline/utf8_tests.py", line 68, in basic_utf8_conversion
    locale.setlocale(locale.LC_ALL, 'en_US.ISO8859-1')
  File "/usr/lib/python2.1/locale.py", line 374, in setlocale
    return _setlocale(category, locale)
Error: locale setting not supported
FAIL: utf8_tests.py 1: conversion of paths and logs to/from utf8

The Skip condition is checking the current locale, why does the test
then try to change it?

-- 
Philip Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Jan 20 23:36:53 2005

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.