@@ -845,12 +845,12 @@ def test_require_equal_number_of_fields(self):
845
845
with self .assertRaises (SetOperationException ):
846
846
str (query1 + query2 )
847
847
848
- def test_mysql_query_does_not_wrap_unioned_queries_with_params (self ):
848
+ def test_mysql_query_wraps_unioned_queries (self ):
849
849
query1 = MySQLQuery .from_ (self .table1 ).select (self .table1 .foo )
850
850
query2 = Query .from_ (self .table2 ).select (self .table2 .bar )
851
851
852
852
self .assertEqual (
853
- "SELECT `foo` FROM `abc` UNION SELECT `bar` FROM `efg`" ,
853
+ "( SELECT `foo` FROM `abc`) UNION ( SELECT `bar` FROM `efg`) " ,
854
854
str (query1 + query2 ),
855
855
)
856
856
@@ -968,12 +968,12 @@ def test_require_equal_number_of_fields_intersect(self):
968
968
with self .assertRaises (SetOperationException ):
969
969
str (query1 .intersect (query2 ))
970
970
971
- def test_mysql_query_does_not_wrap_intersected_queries_with_params (self ):
971
+ def test_mysql_query_wraps_intersected_queries (self ):
972
972
query1 = MySQLQuery .from_ (self .table1 ).select (self .table1 .foo )
973
973
query2 = Query .from_ (self .table2 ).select (self .table2 .bar )
974
974
975
975
self .assertEqual (
976
- "SELECT `foo` FROM `abc` INTERSECT SELECT `bar` FROM `efg`" ,
976
+ "( SELECT `foo` FROM `abc`) INTERSECT ( SELECT `bar` FROM `efg`) " ,
977
977
str (query1 .intersect (query2 )),
978
978
)
979
979
@@ -1064,12 +1064,12 @@ def test_require_equal_number_of_fields(self):
1064
1064
with self .assertRaises (SetOperationException ):
1065
1065
str (query1 .minus (query2 ))
1066
1066
1067
- def test_mysql_query_does_not_wrap_minus_queries_with_params (self ):
1067
+ def test_mysql_query_wraps_minus_queries (self ):
1068
1068
query1 = MySQLQuery .from_ (self .table1 ).select (self .table1 .foo )
1069
1069
query2 = Query .from_ (self .table2 ).select (self .table2 .bar )
1070
1070
1071
1071
self .assertEqual (
1072
- "SELECT `foo` FROM `abc` MINUS SELECT `bar` FROM `efg`" ,
1072
+ "( SELECT `foo` FROM `abc`) MINUS ( SELECT `bar` FROM `efg`) " ,
1073
1073
str (query1 - query2 ),
1074
1074
)
1075
1075
0 commit comments