comparison tests/test-check-py3-commands.t @ 30569:bcb858396233

py3: avoid use of basestring "In this case, result is a source variable of a list to be returned, it shouldn't be unicode. Hence we can use bytes instead of basestring here." -Yuya
author Pulkit Goyal <7895pulkit@gmail.com>
date Wed, 30 Nov 2016 23:51:11 +0530
parents 954002426f78
children 2d555d753f0e
comparison
equal deleted inserted replaced
30568:bb35fe8621f5 30569:bcb858396233
7 $ for cmd in version debuginstall ; do 7 $ for cmd in version debuginstall ; do
8 > echo $cmd 8 > echo $cmd
9 > $PYTHON3 `which hg` $cmd 2>&1 2>&1 | tail -1 9 > $PYTHON3 `which hg` $cmd 2>&1 2>&1 | tail -1
10 > done 10 > done
11 version 11 version
12 NameError: name 'basestring' is not defined 12 TypeError: Can't convert 'bytes' object to str implicitly
13 debuginstall 13 debuginstall
14 NameError: name 'basestring' is not defined 14 TypeError: Can't convert 'bytes' object to str implicitly