mirror of
https://github.com/RustPython/RustPython.git
synced 2026-06-17 01:51:39 +09:00
Merge branch 'master' of https://github.com/rustpython/rustpython
This commit is contained in:
@@ -59,6 +59,11 @@ assert int(1).__rxor__(1) == 0
|
||||
assert int(3).__rxor__(-3) == -2
|
||||
assert int(3).__rxor__(4) == 7
|
||||
|
||||
assert int(4).__lshift__(1) == 8
|
||||
assert int(4).__rshift__(1) == 2
|
||||
assert int(4).__rlshift__(1) == 16
|
||||
assert int(4).__rrshift__(1) == 0
|
||||
|
||||
# Test underscores in numbers:
|
||||
assert 1_2 == 12
|
||||
assert 1_2_3 == 123
|
||||
|
||||
@@ -135,3 +135,5 @@ assert socket.inet_ntoa(b"\xff\xff\xff\xff")=="255.255.255.255"
|
||||
with assertRaises(OSError):
|
||||
socket.inet_ntoa(b"\xff\xff\xff\xff\xff")
|
||||
|
||||
with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s:
|
||||
pass
|
||||
|
||||
@@ -300,3 +300,6 @@ assert next(str_iter_reversed) == "2"
|
||||
assert next(str_iter_reversed) == "1"
|
||||
assert next(str_iter_reversed, None) == None
|
||||
assert_raises(StopIteration, lambda: next(str_iter_reversed))
|
||||
|
||||
assert str.__rmod__('%i', 30) == NotImplemented
|
||||
assert_raises(TypeError, lambda: str.__rmod__(30, '%i'))
|
||||
|
||||
Reference in New Issue
Block a user