|
4 | 4 | from __future__ import annotations
|
5 | 5 |
|
6 | 6 | from pathlib import Path
|
| 7 | +from test.utils import LONG_TESTS |
7 | 8 |
|
8 | 9 | import pytest
|
9 | 10 |
|
@@ -221,66 +222,125 @@ def test_language_package_none_found(self, filename: str) -> None:
|
221 | 222 | @pytest.mark.parametrize(
|
222 | 223 | "filename,parser_class,products,namespace",
|
223 | 224 | [
|
224 |
| - (str(TEST_FILE_PATH / "renv.lock"), parsers.r.RParser, R_PRODUCTS, "cran"), |
225 |
| - ( |
| 225 | + pytest.param( |
| 226 | + str(TEST_FILE_PATH / "renv.lock"), |
| 227 | + parsers.r.RParser, |
| 228 | + R_PRODUCTS, |
| 229 | + "cran", |
| 230 | + marks=[ |
| 231 | + pytest.mark.skipif( |
| 232 | + not LONG_TESTS(), |
| 233 | + reason="Test reduction in short tests", |
| 234 | + ) |
| 235 | + ], |
| 236 | + ), |
| 237 | + pytest.param( |
226 | 238 | str(TEST_FILE_PATH / "Cargo.lock"),
|
227 | 239 | parsers.rust.RustParser,
|
228 | 240 | RUST_PRODUCTS,
|
229 | 241 | "cargo",
|
| 242 | + marks=[ |
| 243 | + pytest.mark.skipif( |
| 244 | + not LONG_TESTS(), |
| 245 | + reason="Test reduction in short tests", |
| 246 | + ) |
| 247 | + ], |
230 | 248 | ),
|
231 |
| - ( |
| 249 | + pytest.param( |
232 | 250 | str(TEST_FILE_PATH / "Gemfile.lock"),
|
233 | 251 | parsers.ruby.RubyParser,
|
234 | 252 | RUBY_PRODUCTS,
|
235 | 253 | "gem",
|
| 254 | + marks=[ |
| 255 | + pytest.mark.skipif( |
| 256 | + not LONG_TESTS(), |
| 257 | + reason="Test reduction in short tests", |
| 258 | + ) |
| 259 | + ], |
236 | 260 | ),
|
237 |
| - ( |
| 261 | + pytest.param( |
238 | 262 | str(TEST_FILE_PATH / "requirements.txt"),
|
239 |
| - parsers.python.PythonRequirementsParser, |
| 263 | + parsers.python.PythonParser, |
240 | 264 | PYTHON_PRODUCTS,
|
241 | 265 | "pypi",
|
| 266 | + marks=[ |
| 267 | + pytest.mark.skipif( |
| 268 | + not LONG_TESTS(), |
| 269 | + reason="Test reduction in short tests", |
| 270 | + ) |
| 271 | + ], |
242 | 272 | ),
|
243 |
| - ( |
| 273 | + pytest.param( |
244 | 274 | str(TEST_FILE_PATH / "package-lock.json"),
|
245 | 275 | parsers.javascript.JavascriptParser,
|
246 | 276 | JAVASCRIPT_PRODUCTS,
|
247 | 277 | "npm",
|
| 278 | + marks=[ |
| 279 | + pytest.mark.skipif( |
| 280 | + not LONG_TESTS(), |
| 281 | + reason="Test reduction in short tests", |
| 282 | + ) |
| 283 | + ], |
248 | 284 | ),
|
249 |
| - ( |
250 |
| - str(TEST_FILE_PATH / ".package-lock.json"), |
251 |
| - parsers.javascript.JavascriptParser, |
252 |
| - JAVASCRIPT_PRODUCTS, |
253 |
| - "npm", |
254 |
| - ), |
255 |
| - ( |
| 285 | + pytest.param( |
256 | 286 | str(TEST_FILE_PATH / "go.mod"),
|
257 | 287 | parsers.go.GoParser,
|
258 | 288 | GO_PRODUCTS,
|
259 | 289 | "golang",
|
| 290 | + marks=[ |
| 291 | + pytest.mark.skipif( |
| 292 | + not LONG_TESTS(), |
| 293 | + reason="Test reduction in short tests", |
| 294 | + ) |
| 295 | + ], |
260 | 296 | ),
|
261 |
| - ( |
| 297 | + pytest.param( |
262 | 298 | str(TEST_FILE_PATH / "Package.resolved"),
|
263 | 299 | parsers.swift.SwiftParser,
|
264 | 300 | SWIFT_PRODUCTS,
|
265 | 301 | "swift",
|
| 302 | + marks=[ |
| 303 | + pytest.mark.skipif( |
| 304 | + not LONG_TESTS(), |
| 305 | + reason="Test reduction in short tests", |
| 306 | + ) |
| 307 | + ], |
266 | 308 | ),
|
267 |
| - ( |
| 309 | + pytest.param( |
268 | 310 | str(TEST_FILE_PATH / "composer.lock"),
|
269 | 311 | parsers.php.PhpParser,
|
270 | 312 | PHP_PRODUCTS,
|
271 | 313 | "composer",
|
| 314 | + marks=[ |
| 315 | + pytest.mark.skipif( |
| 316 | + not LONG_TESTS(), |
| 317 | + reason="Test reduction in short tests", |
| 318 | + ) |
| 319 | + ], |
272 | 320 | ),
|
273 |
| - ( |
| 321 | + pytest.param( |
274 | 322 | str(TEST_FILE_PATH / "cpanfile"),
|
275 | 323 | parsers.perl.PerlParser,
|
276 | 324 | PERL_PRODUCTS,
|
277 | 325 | "cpan",
|
| 326 | + marks=[ |
| 327 | + pytest.mark.skipif( |
| 328 | + not LONG_TESTS(), |
| 329 | + reason="Test reduction in short tests", |
| 330 | + ) |
| 331 | + ], |
278 | 332 | ),
|
279 |
| - ( |
| 333 | + pytest.param( |
280 | 334 | str(TEST_FILE_PATH / "pubspec.lock"),
|
281 | 335 | parsers.dart.DartParser,
|
282 | 336 | DART_PRODUCTS,
|
283 | 337 | "pub",
|
| 338 | + marks=[ |
| 339 | + pytest.mark.skipif( |
| 340 | + not LONG_TESTS(), |
| 341 | + reason="Test reduction in short tests", |
| 342 | + ) |
| 343 | + ], |
284 | 344 | ),
|
285 | 345 | ],
|
286 | 346 | )
|
|
0 commit comments