Skip to content

Commit a604dc8

Browse files
committed
Add tests for slice
1 parent 58b0bf5 commit a604dc8

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

py/tests/slice.py

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Copyright 2019 The go-python Authors. All rights reserved.
2+
# Use of this source code is governed by a BSD-style
3+
# license that can be found in the LICENSE file.
4+
5+
doc="slice"
6+
a = slice(10)
7+
assert a.start == None
8+
assert a.stop == 10
9+
assert a.step == None
10+
11+
a = slice(0, 10, 1)
12+
assert a.start == 0
13+
assert a.stop == 10
14+
assert a.step == 1
15+
16+
doc="finished"

0 commit comments

Comments
 (0)