Skip to content

Fix flaky stata test #25707

Closed
Closed
@TomAugspurger

Description

@TomAugspurger

The test test_write_fspath_all in

def test_write_fspath_all(self, writer_name, writer_kwargs, module):
asserts that two files are byte-for-byte identical. This can fail for files like stata, which encode other information like the current timestamp, in the binary data.

DataFrame.to_stata provides a keyword time_stamp to control whether the timestamp is written in the binary file.

To avoid spurious test failures from writing the first file at timestamp 1, and the second file at timestamp 2, we should pass that keyword through by adding {'time_stamp': False} to the dict in

('to_stata', {}, 'os'),

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions