Skip to content

Commit 2d32237

Browse files
committed
Add tests
1 parent f09d7c7 commit 2d32237

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

tests/suite/test_cliclass.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1199,11 +1199,14 @@ def test_serialization(self):
11991199
System.StringSplitOptions.RemoveEmptyEntries,
12001200
]
12011201

1202-
if False:
1203-
# TODO: Enum types are not picklable if defined in nested namespaces
1204-
# https://github.com/IronLanguages/ironpython3/issues/1989
1205-
clr.AddReference("System.Text.Json")
1206-
data.append(System.Text.Json.JsonValueKind.Object) # byte-based enum
1202+
if is_cli:
1203+
# enum types
1204+
clr.AddReference("Microsoft.Scripting")
1205+
import Microsoft.Scripting
1206+
data.append(Microsoft.Scripting.Severity.Warning) # different namespace than System
1207+
if is_netcoreapp:
1208+
clr.AddReference("System.Text.Json")
1209+
data.append(System.Text.Json.JsonValueKind.Object) # byte-based enum
12071210

12081211
data.append(list(data)) # list of all the data..
12091212
data.append(tuple(data)) # tuple of all the data...

0 commit comments

Comments
 (0)