mirror of
https://github.com/RustPython/RustPython.git
synced 2026-06-02 19:39:49 +09:00
Fix test_path_like_objects (#4773)
Co-authored-by: DimitrisJim <d.f.hilliard@gmail.com>
This commit is contained in:
2
Lib/test/test_compile.py
vendored
2
Lib/test/test_compile.py
vendored
@@ -757,8 +757,6 @@ if 1:
|
||||
self.assertTrue(f1(0))
|
||||
self.assertTrue(f2(0.0))
|
||||
|
||||
# TODO: RUSTPYTHON
|
||||
@unittest.expectedFailure
|
||||
def test_path_like_objects(self):
|
||||
# An implicit test for PyUnicode_FSDecoder().
|
||||
compile("42", FakePath("test_compile_pathlike"), "single")
|
||||
|
||||
2
Lib/test/test_runpy.py
vendored
2
Lib/test/test_runpy.py
vendored
@@ -656,8 +656,6 @@ class RunPathTestCase(unittest.TestCase, CodeExecutionMixin):
|
||||
self._check_script(script_name, "<run_path>", script_name,
|
||||
script_name, expect_spec=False)
|
||||
|
||||
# TODO: RUSTPYTHON
|
||||
@unittest.expectedFailure
|
||||
def test_basic_script_with_path_object(self):
|
||||
with temp_dir() as script_dir:
|
||||
mod_name = 'script'
|
||||
|
||||
@@ -21,7 +21,8 @@ mod builtins {
|
||||
convert::ToPyException,
|
||||
function::{
|
||||
ArgBytesLike, ArgCallable, ArgIndex, ArgIntoBool, ArgIterable, ArgMapping,
|
||||
ArgStrOrBytesLike, Either, FuncArgs, KwArgs, OptionalArg, OptionalOption, PosArgs,
|
||||
ArgStrOrBytesLike, Either, FsPath, FuncArgs, KwArgs, OptionalArg, OptionalOption,
|
||||
PosArgs,
|
||||
},
|
||||
protocol::{PyIter, PyIterReturn},
|
||||
py_io,
|
||||
@@ -97,7 +98,7 @@ mod builtins {
|
||||
#[allow(dead_code)]
|
||||
struct CompileArgs {
|
||||
source: PyObjectRef,
|
||||
filename: PyStrRef,
|
||||
filename: FsPath,
|
||||
mode: PyStrRef,
|
||||
#[pyarg(any, optional)]
|
||||
flags: OptionalArg<PyIntRef>,
|
||||
|
||||
@@ -5,6 +5,7 @@ use crate::{
|
||||
function::{ArgumentError, FromArgs, FsPath, FuncArgs},
|
||||
AsObject, Py, PyObjectRef, PyPayload, PyResult, TryFromObject, VirtualMachine,
|
||||
};
|
||||
|
||||
use std::{
|
||||
ffi, fs, io,
|
||||
path::{Path, PathBuf},
|
||||
|
||||
Reference in New Issue
Block a user