self =
pandas_data_serializer =
tmp_path = PosixPath('/tmp/pytest-of-root/pytest-0/popen-gw0/test_serialize_float_only_defa0')
@pytest.mark.usefixtures("mock_storage_blob_tmp_dir", "google_auth_mock")
def test_serialize_float_only_default_index_dataframe(
self, pandas_data_serializer, tmp_path
):
# Arrange
fake_gcs_uri = "gs://staging-bucket/fake_gcs_uri.parquet"
df = pd.DataFrame(np.zeros(shape=[3, 3]), columns=["col1", "col2", "col3"])
# Act
> pandas_data_serializer.serialize(df, fake_gcs_uri)
tests/unit/vertexai/test_serializers.py:1162:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
vertexai/preview/_workflow/serialization_engine/serializers.py:980: in serialize
with tempfile.NamedTemporaryFile() as temp_file:
/usr/local/lib/python3.8/tempfile.py:542: in NamedTemporaryFile
file = _io.open(fd, mode, buffering=buffering,
.nox/unit-3-8/lib/python3.8/site-packages/pyfakefs/fake_io.py:117: in open
return fake_open(
.nox/unit-3-8/lib/python3.8/site-packages/pyfakefs/fake_open.py:97: in __call__
return self.call(*args, **kwargs)
.nox/unit-3-8/lib/python3.8/site-packages/pyfakefs/fake_open.py:160: in call
file_object, file_path, filedes, real_path = self._handle_file_arg(file_)
.nox/unit-3-8/lib/python3.8/site-packages/pyfakefs/fake_open.py:312: in _handle_file_arg
wrapper = self.filesystem.get_open_file(filedes)
.nox/unit-3-8/lib/python3.8/site-packages/pyfakefs/fake_filesystem.py:867: in get_open_file
self.raise_os_error(errno.EBADF, str(file_des))
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self =
err_no = 9, filename = '19', winerror = None
def raise_os_error(
self,
err_no: int,
filename: Optional[AnyString] = None,
winerror: Optional[int] = None,
) -> NoReturn:
"""Raises OSError.
The error message is constructed from the given error code and shall
start with the error string issued in the real system.
Note: this is not true under Windows if winerror is given - in this
case a localized message specific to winerror will be shown in the
real file system.
Args:
err_no: A numeric error code from the C variable errno.
filename: The name of the affected file, if any.
winerror: Windows only - the specific Windows error code.
"""
message = os.strerror(err_no) + " in the fake filesystem"
if winerror is not None and sys.platform == "win32" and self.is_windows_fs:
raise OSError(err_no, message, filename, winerror)
> raise OSError(err_no, message, filename)
E OSError: [Errno 9] Bad file descriptor in the fake filesystem: '19'
.nox/unit-3-8/lib/python3.8/site-packages/pyfakefs/fake_filesystem.py:428: OSError
This test failed!
To configure my behavior, see the Flaky Bot documentation.
If I'm commenting on this issue too often, add the
flakybot: quiet
label and I will stop commenting.commit: 8db915636bb7c7cb6a258a60c07b1b68275f3094 buildURL: Build Status, Sponge status: failed
Test output