tests/test-issue842.out
author Renato Cunha <renatoc@gmail.com>
Sat, 07 Aug 2010 16:38:38 -0300
changeset 11878 8bb1481cf08f
parent 6336 4b0c9c674707
permissions -rw-r--r--
py3kcompat: added fake ord implementation for py3k In py3k, a bytes object __getitem__ will return an int instead of a one-character bytes object. This has negative consequences when we want to ord(), like in the following example: >>> b'foo'[0] 102 >>> ord(b'foo'[0]) Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: ord() expected string of length 1, but int found This patch overrides the default ord() implementation to just return an int that's what is passed as an argument for ord(). Making the above call succeed: >>> ord(b'foo'[0]) 102
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
6336
4b0c9c674707 warn about new heads on commit (issue842)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
     1
adding a
4b0c9c674707 warn about new heads on commit (issue842)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
     2
0 files updated, 0 files merged, 1 files removed, 0 files unresolved
4b0c9c674707 warn about new heads on commit (issue842)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
     3
% should issue warning
4b0c9c674707 warn about new heads on commit (issue842)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
     4
adding a
4b0c9c674707 warn about new heads on commit (issue842)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
     5
created new head
4b0c9c674707 warn about new heads on commit (issue842)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
     6
0 files updated, 0 files merged, 1 files removed, 0 files unresolved
4b0c9c674707 warn about new heads on commit (issue842)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
     7
% should not issue warning
4b0c9c674707 warn about new heads on commit (issue842)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
     8
0 files updated, 0 files merged, 1 files removed, 0 files unresolved
4b0c9c674707 warn about new heads on commit (issue842)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
     9
marked working directory as branch testing
4b0c9c674707 warn about new heads on commit (issue842)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
    10
% should not issue warning