File tree Expand file tree Collapse file tree 3 files changed +32
-0
lines changed Expand file tree Collapse file tree 3 files changed +32
-0
lines changed Original file line number Diff line number Diff line change 2
2
# Licensed under the MIT License.
3
3
4
4
from datetime import datetime
5
+ import sys
5
6
import unittest
6
7
from typing import List
7
8
@@ -13,6 +14,10 @@ class MyTestCase(unittest.TestCase):
13
14
def test_eventgrid_input_type (self ):
14
15
check_input_type = azf_event_grid .EventGridEventInConverter .\
15
16
check_input_type_annotation
17
+
18
+ if sys .version_info >= (3 , 9 ):
19
+ self .assertTrue (check_input_type (list [func .EventGridEvent ]))
20
+
16
21
self .assertTrue (check_input_type (func .EventGridEvent ))
17
22
self .assertFalse (check_input_type (List [func .EventGridEvent ]))
18
23
self .assertFalse (check_input_type (str ))
@@ -21,6 +26,11 @@ def test_eventgrid_input_type(self):
21
26
def test_eventgrid_output_type (self ):
22
27
check_output_type = azf_event_grid .EventGridEventOutConverter .\
23
28
check_output_type_annotation
29
+
30
+ if sys .version_info >= (3 , 9 ):
31
+ self .assertTrue (check_output_type (list [func .EventGridEvent ]))
32
+ self .assertTrue (check_output_type (list [str ]))
33
+
24
34
self .assertTrue (check_output_type (func .EventGridOutputEvent ))
25
35
self .assertTrue (check_output_type (List [func .EventGridOutputEvent ]))
26
36
self .assertTrue (check_output_type (str ))
Original file line number Diff line number Diff line change 1
1
# Copyright (c) Microsoft Corporation. All rights reserved.
2
2
# Licensed under the MIT License.
3
3
4
+ import sys
4
5
from typing import List , Mapping
5
6
import unittest
6
7
import json
@@ -21,6 +22,10 @@ def test_eventhub_input_type(self):
21
22
check_input_type = (
22
23
azf_eh .EventHubConverter .check_input_type_annotation
23
24
)
25
+ if sys .version_info >= (3 , 9 ):
26
+ self .assertTrue (check_input_type (list [func .EventGridEvent ]))
27
+ self .assertTrue (check_input_type (list [str ]))
28
+
24
29
self .assertTrue (check_input_type (func .EventHubEvent ))
25
30
self .assertTrue (check_input_type (List [func .EventHubEvent ]))
26
31
self .assertFalse (check_input_type (str ))
@@ -31,6 +36,11 @@ def test_eventhub_output_type(self):
31
36
check_output_type = (
32
37
azf_eh .EventHubTriggerConverter .check_output_type_annotation
33
38
)
39
+
40
+ if sys .version_info >= (3 , 9 ):
41
+ self .assertTrue (check_output_type (list [func .EventGridEvent ]))
42
+ self .assertTrue (check_output_type (list [str ]))
43
+
34
44
self .assertTrue (check_output_type (bytes ))
35
45
self .assertTrue (check_output_type (str ))
36
46
self .assertTrue (check_output_type (List [str ]))
Original file line number Diff line number Diff line change 1
1
# Copyright (c) Microsoft Corporation. All rights reserved.
2
2
# Licensed under the MIT License.
3
3
4
+ import sys
4
5
from typing import List
5
6
import unittest
6
7
import json
@@ -33,6 +34,11 @@ def test_kafka_input_type(self):
33
34
check_input_type = (
34
35
azf_ka .KafkaConverter .check_input_type_annotation
35
36
)
37
+
38
+ if sys .version_info >= (3 , 9 ):
39
+ self .assertTrue (check_input_type (list [func .KafkaEvent ]))
40
+ self .assertTrue (check_input_type (list [str ]))
41
+
36
42
self .assertTrue (check_input_type (func .KafkaEvent ))
37
43
self .assertTrue (check_input_type (List [func .KafkaEvent ]))
38
44
self .assertFalse (check_input_type (str ))
@@ -43,6 +49,12 @@ def test_kafka_output_type(self):
43
49
check_output_type = (
44
50
azf_ka .KafkaTriggerConverter .check_output_type_annotation
45
51
)
52
+
53
+ if sys .version_info >= (3 , 9 ):
54
+ self .assertTrue (check_output_type (list [func .KafkaEvent ]))
55
+ self .assertTrue (check_output_type (list [str ]))
56
+ self .assertTrue (check_output_type (list [bytes ]))
57
+
46
58
self .assertTrue (check_output_type (bytes ))
47
59
self .assertTrue (check_output_type (str ))
48
60
self .assertTrue (check_output_type (List [str ]))
You can’t perform that action at this time.
0 commit comments