← Back to team overview

openstack team mailing list archive

Questions About test_localization.py

 

Hi All,

I'm going to be spending my days for a little while just taking tests
and source files that haven't been touched in a while and refactoring
them or cleaning them up.  The first one I picked was
tests/test_localization.py, and I've refactored it to be this:

http://codepad.org/YTODudUt

It does the same thing, but it's using the Python AST so it's accurate
about what it's checking and source lines, etc.  It is slower though,
but about 2 seconds.

Now, after refactoring that, I'm sort of confused about actually what
this test is doing.  I mean, it's just checking % signs in strings,
which seems sort of pointless as a gettext check.

I want to either:

1.  Make this confirm that the strings are in gettext, and
find other strings that should also be in gettext but aren't.

2. Get rid of this test as it's not doing much.

Comments welcome.

-- 
Zed A. Shaw
http://zedshaw.com/


Follow ups