# HG changeset patch # User David Douard # Date 1375195737 -7200 # Node ID 83f73a9746f65971b51dcce6d0ed371c6e90a074 # Parent b0f6e8c14e7fb5ddf084717211b16412e4ccf883 [i18n test] hack to make i18n tests run using a Python interpreter they used to work fine when executed via pytest only. This should be removed as soon as logilab.common.registry is fixed. diff -r b0f6e8c14e7f -r 83f73a9746f6 devtools/test/data/cubes/i18ntestcube/views.py --- a/devtools/test/data/cubes/i18ntestcube/views.py Tue Jul 30 10:06:06 2013 +0200 +++ b/devtools/test/data/cubes/i18ntestcube/views.py Tue Jul 30 16:48:57 2013 +0200 @@ -25,7 +25,10 @@ __select__ = is_instance('ForumThread') _myafs = MyAFS() + +# XXX useless ASA logilab.common.registry is fixed _myafs.__module__ = "cubes.i18ntestcube.views" + _myafs.tag_object_of(('*', 'in_forum', 'Forum'), 'main', 'inlined') afs.tag_object_of(('*', 'in_forum', 'Forum'), 'main', 'inlined') diff -r b0f6e8c14e7f -r 83f73a9746f6 devtools/test/unittest_i18n.py --- a/devtools/test/unittest_i18n.py Tue Jul 30 10:06:06 2013 +0200 +++ b/devtools/test/unittest_i18n.py Tue Jul 30 16:48:57 2013 +0200 @@ -71,4 +71,9 @@ self.assertEqual(msgs, newmsgs) if __name__ == '__main__': + # XXX dirty hack to make this test runnable using python (works + # fine with pytest, but not with python directly if this hack is + # not present) + # XXX to remove ASA logilab.common is fixed + sys.path.append('') unittest_main()