Skip to content

Commit f624fdf

Browse files
author
Guido van Rossum
committed
Test python2 with unicode, bytes
1 parent 7fed2ec commit f624fdf

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

test-data/unit/check-enum.test

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -331,3 +331,19 @@ y = B.E.a
331331
x = y
332332
[out]
333333
main:8: error: Incompatible types in assignment (expression has type "__main__.B.E", variable has type "__main__.A.E")
334+
335+
[case testFunctionalEnum_python2]
336+
from enum import Enum
337+
Eu = Enum(u'Eu', u'a b')
338+
Eb = Enum(b'Eb', b'a b')
339+
Gu = Enum(u'Gu', {u'a': 1})
340+
Gb = Enum(b'Gb', {b'a': 1})
341+
Hu = Enum(u'Hu', [u'a'])
342+
Hb = Enum(b'Hb', [b'a'])
343+
Eu.a
344+
Eb.a
345+
Gu.a
346+
Gb.a
347+
Hu.a
348+
Hb.a
349+
[out]

0 commit comments

Comments
 (0)