https://codereview.appspot.com/9478044/diff/1/MoinMoin/_tests/__init__.py File MoinMoin/_tests/__init__.py (right): https://codereview.appspot.com/9478044/diff/1/MoinMoin/_tests/__init__.py#newcode12 MoinMoin/_tests/__init__.py:12: from io import StringIO did you notice how that ...
11 years, 6 months ago
(2013-05-19 19:45:00 UTC)
#1
https://codereview.appspot.com/9478044/diff/1/MoinMoin/apps/frontend/_tests/test_frontend.py File MoinMoin/apps/frontend/_tests/test_frontend.py (right): https://codereview.appspot.com/9478044/diff/1/MoinMoin/apps/frontend/_tests/test_frontend.py#newcode27 MoinMoin/apps/frontend/_tests/test_frontend.py:27: print('%s %s' % (method, url_for(viewname, **viewopts))) I have used ...
11 years, 6 months ago
(2013-05-20 13:58:37 UTC)
#3
https://codereview.appspot.com/9478044/diff/1/MoinMoin/apps/frontend/_tests/t...
File MoinMoin/apps/frontend/_tests/test_frontend.py (right):
https://codereview.appspot.com/9478044/diff/1/MoinMoin/apps/frontend/_tests/t...
MoinMoin/apps/frontend/_tests/test_frontend.py:27: print('%s %s' % (method,
url_for(viewname, **viewopts)))
I have used the test case
--print('%s %s' % ('Moin','Wiki'))--
and this works well on both python2 and python3
P.S: If I am not getting in what respect the change does not work then Please
let me know.
On 2013/05/19 19:45:00, Thomas.J.Waldmann wrote:
> that does not work on python 2
https://codereview.appspot.com/9478044/diff/1/MoinMoin/converter/_tests/test_...
File MoinMoin/converter/_tests/test__args_wiki.py (right):
https://codereview.appspot.com/9478044/diff/1/MoinMoin/converter/_tests/test_...
MoinMoin/converter/_tests/test__args_wiki.py:24: u'''"a b\tc\nd" k="a
b\tc\nd"''',
Yes Thomas a bit confused over this as raw unicode literals are used
differently in python 3.x. raw literals puts an extra slash so the the Escape
sequence also treated as simple strings.
simple raw string literals can be used but using raw unicode literals gives
SyntaxError. This is not included in python 3.
On the other hand raw byte strings are working well.
So should I use try catch instead to use ur -literal for py2 and rb -literal for
py3. ?
On 2013/05/19 19:45:00, Thomas.J.Waldmann wrote:
> you realized that this means something different now?
>
> why did you change it?
https://codereview.appspot.com/9478044/diff/1/MoinMoin/datastruct/backends/_t...
File MoinMoin/datastruct/backends/_tests/__init__.py (right):
https://codereview.appspot.com/9478044/diff/1/MoinMoin/datastruct/backends/_t...
MoinMoin/datastruct/backends/_tests/__init__.py:48: for group, members in
self.expanded_groups.items():
items() return the list of tuples of key,value pairs. This takes up the full
space whether or not the iteration proceeds further. The change may result in
this problem.
Whereas iteritems() is a generator object that get the memory as per the
iteration proceeds
but items() are for backward compatibility and items() in py3 works as
iteritems(). So I used this.
Should I use the try except and make it more better ?
On 2013/05/19 19:45:00, Thomas.J.Waldmann wrote:
> that means something a bit different when run on py2
https://codereview.appspot.com/9478044/diff/1/MoinMoin/datastruct/backends/_t...
MoinMoin/datastruct/backends/_tests/__init__.py:148: for dict_name,
expected_dict in list(expected_dicts.items()):
Sorry for this Useless change would fix this soon.
On 2013/05/19 19:45:00, Thomas.J.Waldmann wrote:
> why?
https://codereview.appspot.com/9478044/diff/1/MoinMoin/util/_tests/test_inter...
File MoinMoin/util/_tests/test_interwiki.py (right):
https://codereview.appspot.com/9478044/diff/1/MoinMoin/util/_tests/test_inter...
MoinMoin/util/_tests/test_interwiki.py:200: testfile =
os.path.join(abspath,a,'contrib', 'interwiki', 'intermap.txt')
Sorry Thomas for this change Please do not consider this.
Its my mistake
On 2013/05/19 19:45:00, Thomas.J.Waldmann wrote:
> that's unrelated and i think we already talked about it
Issue 9478044: Ported test cases of Moin2 for python 3.x with backward compatibility
Created 11 years, 6 months ago by chitrankdixit
Modified 11 years, 6 months ago
Reviewers: thomas.j.waldmann_gmail.com
Base URL:
Comments: 14