(self)
| 348 | return self._test_ddir_only(ddir="", parallel=True) |
| 349 | |
| 350 | def test_strip_only(self): |
| 351 | fullpath = ["test", "build", "real", "path"] |
| 352 | path = os.path.join(self.directory, *fullpath) |
| 353 | os.makedirs(path) |
| 354 | script = script_helper.make_script(path, "test", "1 / 0") |
| 355 | bc = importlib.util.cache_from_source(script) |
| 356 | stripdir = os.path.join(self.directory, *fullpath[:2]) |
| 357 | compileall.compile_dir(path, quiet=True, stripdir=stripdir) |
| 358 | rc, out, err = script_helper.assert_python_failure(bc) |
| 359 | expected_in = os.path.join(*fullpath[2:]) |
| 360 | self.assertIn( |
| 361 | expected_in, |
| 362 | str(err, encoding=sys.getdefaultencoding()) |
| 363 | ) |
| 364 | self.assertNotIn( |
| 365 | stripdir, |
| 366 | str(err, encoding=sys.getdefaultencoding()) |
| 367 | ) |
| 368 | |
| 369 | def test_strip_only_invalid(self): |
| 370 | fullpath = ["test", "build", "real", "path"] |
nothing calls this directly
no test coverage detected