@@ -44,7 +44,7 @@ void quickfixEquality(){
44
44
" if math.isclose(a - 0.1, b, rel_tol=1e-09, abs_tol=1e-09):\n " +
45
45
" ..." ;
46
46
PythonQuickFixVerifier .verify (check , noncompliant , compliant );
47
- PythonQuickFixVerifier .verifyQuickFixMessages (check , noncompliant , "Replace with math.isclose()." );
47
+ PythonQuickFixVerifier .verifyQuickFixMessages (check , noncompliant , "Replace with \" math.isclose()\" ." );
48
48
}
49
49
50
50
@ Test
@@ -72,10 +72,10 @@ void quickfixInequality(){
72
72
String compliant =
73
73
"import math\n " +
74
74
"def foo(a,b):\n " +
75
- " if ! math.isclose(a - 0.1, b, rel_tol=1e-09, abs_tol=1e-09):\n " +
75
+ " if not math.isclose(a - 0.1, b, rel_tol=1e-09, abs_tol=1e-09):\n " +
76
76
" ..." ;
77
77
PythonQuickFixVerifier .verify (check , noncompliant , compliant );
78
- PythonQuickFixVerifier .verifyQuickFixMessages (check , noncompliant , "Replace with ! math.isclose()." );
78
+ PythonQuickFixVerifier .verifyQuickFixMessages (check , noncompliant , "Replace with \" not math.isclose()\" ." );
79
79
}
80
80
81
81
@ Test
@@ -121,7 +121,7 @@ void quickfixNumpyImport(){
121
121
" if numpy.isclose(a - 0.1, b, rtol=1e-09, atol=1e-09):\n " +
122
122
" ..." ;
123
123
PythonQuickFixVerifier .verify (check , noncompliant , compliant );
124
- PythonQuickFixVerifier .verifyQuickFixMessages (check , noncompliant , "Replace with numpy.isclose()." );
124
+ PythonQuickFixVerifier .verifyQuickFixMessages (check , noncompliant , "Replace with \" numpy.isclose()\" ." );
125
125
}
126
126
127
127
@ Test
@@ -137,7 +137,7 @@ void quickfixMultipleImport(){
137
137
" if math.isclose(a - 0.1, b, rel_tol=1e-09, abs_tol=1e-09):\n " +
138
138
" ..." ;
139
139
PythonQuickFixVerifier .verify (check , noncompliant , compliant );
140
- PythonQuickFixVerifier .verifyQuickFixMessages (check , noncompliant , "Replace with math.isclose()." );
140
+ PythonQuickFixVerifier .verifyQuickFixMessages (check , noncompliant , "Replace with \" math.isclose()\" ." );
141
141
}
142
142
143
143
@ Test
@@ -155,7 +155,7 @@ void quickfixPrioritizeNumpyOverMath(){
155
155
" if np.isclose(a - 0.1, b, rtol=1e-09, atol=1e-09):\n " +
156
156
" ..." ;
157
157
PythonQuickFixVerifier .verify (check , noncompliant , compliant );
158
- PythonQuickFixVerifier .verifyQuickFixMessages (check , noncompliant , "Replace with np.isclose()." );
158
+ PythonQuickFixVerifier .verifyQuickFixMessages (check , noncompliant , "Replace with \" np.isclose()\" ." );
159
159
}
160
160
161
161
@ Test
@@ -171,7 +171,7 @@ void quickfixPrioritizeTorchOverMath(){
171
171
" if torch.isclose(a - 0.1, b, rtol=1e-09, atol=1e-09):\n " +
172
172
" ..." ;
173
173
PythonQuickFixVerifier .verify (check , noncompliant , compliant );
174
- PythonQuickFixVerifier .verifyQuickFixMessages (check , noncompliant , "Replace with torch.isclose()." );
174
+ PythonQuickFixVerifier .verifyQuickFixMessages (check , noncompliant , "Replace with \" torch.isclose()\" ." );
175
175
}
176
176
177
177
@ Test
@@ -187,7 +187,7 @@ void quickfixNumpyImportAlias(){
187
187
" if np.isclose(a - 0.1, b, rtol=1e-09, atol=1e-09):\n " +
188
188
" ..." ;
189
189
PythonQuickFixVerifier .verify (check , noncompliant , compliant );
190
- PythonQuickFixVerifier .verifyQuickFixMessages (check , noncompliant , "Replace with np.isclose()." );
190
+ PythonQuickFixVerifier .verifyQuickFixMessages (check , noncompliant , "Replace with \" np.isclose()\" ." );
191
191
}
192
192
193
193
@ Test
@@ -203,7 +203,7 @@ void quickfixPyTorchImport(){
203
203
" if torch.isclose(a - 0.1, b, rtol=1e-09, atol=1e-09):\n " +
204
204
" ..." ;
205
205
PythonQuickFixVerifier .verify (check , noncompliant , compliant );
206
- PythonQuickFixVerifier .verifyQuickFixMessages (check , noncompliant , "Replace with torch.isclose()." );
206
+ PythonQuickFixVerifier .verifyQuickFixMessages (check , noncompliant , "Replace with \" torch.isclose()\" ." );
207
207
}
208
208
209
209
@ Test
@@ -221,6 +221,6 @@ void quickfixTakeFirstImport(){
221
221
" if torch.isclose(a - 0.1, b, rtol=1e-09, atol=1e-09):\n " +
222
222
" ..." ;
223
223
PythonQuickFixVerifier .verify (check , noncompliant , compliant );
224
- PythonQuickFixVerifier .verifyQuickFixMessages (check , noncompliant , "Replace with torch.isclose()." );
224
+ PythonQuickFixVerifier .verifyQuickFixMessages (check , noncompliant , "Replace with \" torch.isclose()\" ." );
225
225
}
226
226
}
0 commit comments