def test_compile_file_pathlike(self):
    self.assertFalse(os.path.isfile(self.bc_path))
    with support.captured_stdout() as stdout:
        self.assertTrue(compileall.compile_file(pathlib.Path(self.source_path)))
    self.assertRegex(stdout.getvalue(), 'Compiling ([^WindowsPath|PosixPath].*)')
    self.assertTrue(os.path.isfile(self.bc_path))
def test_compile_file_pathlike(self):
    self.assertFalse(os.path.isfile(self.bc_path))
    with support.captured_stdout() as stdout:
        self.assertTrue(compileall.compile_file(pathlib.Path(self.source_path)))
    self.assertRegex(stdout.getvalue(), 'Compiling ([^WindowsPath|PosixPath].*)')
    self.assertTrue(os.path.isfile(self.bc_path))