(self)
| 363 | raise |
| 364 | |
| 365 | def test_list_paths(self): |
| 366 | data = self.run_py(["--list-paths"]) |
| 367 | found = {} |
| 368 | expect = {} |
| 369 | for line in data["stdout"].splitlines(): |
| 370 | m = re.match(r"\s*(.+?)\s+?(\*\s+)?(.+)$", line) |
| 371 | if m: |
| 372 | found[m.group(1)] = m.group(3) |
| 373 | for company in TEST_DATA: |
| 374 | company_data = TEST_DATA[company] |
| 375 | tags = [t for t in company_data if isinstance(company_data[t], dict)] |
| 376 | for tag in tags: |
| 377 | arg = f"-V:{company}/{tag}" |
| 378 | install = company_data[tag]["InstallPath"] |
| 379 | try: |
| 380 | expect[arg] = install["ExecutablePath"] |
| 381 | try: |
| 382 | expect[arg] += " " + install["ExecutableArguments"] |
| 383 | except KeyError: |
| 384 | pass |
| 385 | except KeyError: |
| 386 | expect[arg] = str(Path(install[None]) / Path(sys.executable).name) |
| 387 | |
| 388 | expect.pop(f"-V:{company}/ignored", None) |
| 389 | |
| 390 | actual = {k: v for k, v in found.items() if k in expect} |
| 391 | try: |
| 392 | self.assertDictEqual(expect, actual) |
| 393 | except: |
| 394 | if support.verbose: |
| 395 | print("*** STDOUT ***") |
| 396 | print(data["stdout"]) |
| 397 | raise |
| 398 | |
| 399 | def test_filter_to_company(self): |
| 400 | company = "PythonTestSuite" |
nothing calls this directly
no test coverage detected