[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.
--- 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')
--- 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()