def test_compile_dir_pathlike(self):
    self.assertFalse(os.path.isfile(self.bc_path))
    with support.captured_stdout() as stdout:
        compileall.compile_dir(pathlib.Path(self.directory))
    line = stdout.getvalue().splitlines()[0]
    self.assertRegex(line, 'Listing ([^WindowsPath|PosixPath].*)')
    self.assertTrue(os.path.isfile(self.bc_path))
def test_compile_dir_pathlike(self):
    self.assertFalse(os.path.isfile(self.bc_path))
    with support.captured_stdout() as stdout:
        compileall.compile_dir(pathlib.Path(self.directory))
    line = stdout.getvalue().splitlines()[0]
    self.assertRegex(line, 'Listing ([^WindowsPath|PosixPath].*)')
    self.assertTrue(os.path.isfile(self.bc_path))