@@ -27,6 +27,12 @@ def result(self):
2727 return self .equality ()
2828 elif self .test_type == "comparison" :
2929 return self .comparison ()
30+ elif self .test_type == "containment" :
31+ return self .containment ()
32+ elif self .test_type == "roundtrip" :
33+ return self .roundtrip ()
34+ elif self .test_type == "from_native" :
35+ return self .from_native ()
3036
3137 raise Exception (f"Unknown test_type: { self .test_type } " )
3238
@@ -36,6 +42,15 @@ def equality(self):
3642 def comparison (self ):
3743 raise NotImplementedError
3844
45+ def containment (self ):
46+ raise NotImplementedError
47+
48+ def roundtrip (self ):
49+ raise NotImplementedError
50+
51+ def from_native (self ):
52+ raise NotImplementedError
53+
3954 @property
4055 def input_scheme (self ):
4156 return self .input ["input_scheme" ]
@@ -75,3 +90,38 @@ def get_test_data_eq(scheme, versions, output):
7590 },
7691 "expected_output" : output ,
7792 }
93+
94+
95+ def get_test_data_containment (vers , version , output ):
96+ return {
97+ "test_group" : "advanced" ,
98+ "test_type" : "containment" ,
99+ "input" : {
100+ "vers" : vers ,
101+ "version" : version ,
102+ },
103+ "expected_output" : output ,
104+ }
105+
106+
107+ def get_test_data_roundtrip (vers , output ):
108+ return {
109+ "test_group" : "advanced" ,
110+ "test_type" : "roundtrip" ,
111+ "input" : {
112+ "vers" : vers ,
113+ },
114+ "expected_output" : output ,
115+ }
116+
117+
118+ def get_test_data_from_native (native_range , schema , output ):
119+ return {
120+ "test_group" : "advanced" ,
121+ "test_type" : "from_native" ,
122+ "input" : {
123+ "native_range" : native_range ,
124+ "scheme" : schema ,
125+ },
126+ "expected_output" : output ,
127+ }
0 commit comments