File tree Expand file tree Collapse file tree 2 files changed +9
-4
lines changed
python/ql/test/experimental/dataflow Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -48,8 +48,8 @@ def test_or_pattern():
48
48
# No flow for literal pattern
49
49
def test_literal_pattern ():
50
50
match SOURCE :
51
- case 42 as x :
52
- SINK (x ) #$ flow="SOURCE, l:-2 -> x" flow="42 , l:-1 -> x"
51
+ case "source" as x :
52
+ SINK (x ) #$ flow="SOURCE, l:-2 -> x" flow="'source' , l:-1 -> x"
53
53
54
54
def test_capture_pattern ():
55
55
match SOURCE :
Original file line number Diff line number Diff line change
1
+ import sys
2
+
1
3
def check_output (outtext , f ):
2
4
if outtext == "OK\n " :
3
5
pass
@@ -59,8 +61,11 @@ def check_tests_valid(testFile):
59
61
check_tests_valid ("module-initialization.multiphase" )
60
62
check_tests_valid ("fieldflow.test" )
61
63
62
- # The below will fail unless we use Python 3.10 or newer.
63
- # check_tests_valid("match.test")
64
+ if sys .version_info [:2 ] >= (3 , 10 ):
65
+ print ("INFO: Will run `match` tests since we're running Python 3.10 or newer" )
66
+ check_tests_valid ("match.test" )
67
+ else :
68
+ print ("WARN: Skipping `match` tests since we're not running 3.10 or newer" )
64
69
65
70
# The below fails when trying to import modules
66
71
# check_tests_valid("module-initialization.test")
You can’t perform that action at this time.
0 commit comments