-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
#25707 - Fixed flakiness in stata write test #25714
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Codecov Report
@@ Coverage Diff @@
## master #25714 +/- ##
=======================================
Coverage 91.24% 91.24%
=======================================
Files 172 172
Lines 52967 52967
=======================================
Hits 48332 48332
Misses 4635 4635
Continue to review full report at Codecov.
|
…tata write test
Thanks @gwrome! Nice job, and sorry about misleading you in the issue with the |
You're welcome, glad I could help! |
* master: (22 commits) Fixturize tests/frame/test_operators.py (pandas-dev#25641) Update ValueError message in corr (pandas-dev#25729) DOC: fix some grammar and inconsistency issues in the User Guide (pandas-dev#25728) ENH: Add public start, stop, and step attributes to RangeIndex (pandas-dev#25720) Make Rolling.apply documentation clearer (pandas-dev#25712) pandas-dev#25707 - Fixed flakiness in stata write test (pandas-dev#25714) Json normalize nan support (pandas-dev#25619) TST: resolve issues with test_constructor_dtype_datetime64 (pandas-dev#24868) DEPR: Deprecate box kwarg for to_timedelta and to_datetime (pandas-dev#24486) BUG: Preserve name in DatetimeIndex.snap (pandas-dev#25585) Fix concat not respecting order of OrderedDict (pandas-dev#25224) CLN: remove pandas.core.categorical (pandas-dev#25655) TST/CLN: Remove more Panel tests (pandas-dev#25675) Pinned pycodestyle (pandas-dev#25701) DOC: update date of 0.24.2 release notes (pandas-dev#25699) BUG: Fix error in replace with strings that are large numbers (pandas-dev#25616) (pandas-dev#25644) BUG: fix usage of na_sentinel with sort=True in factorize() (pandas-dev#25592) BUG: Fix to_string output when using header (pandas-dev#16718) (pandas-dev#25602) CLN: Remove unused test code (pandas-dev#25670) CLN: remove Panel from concat error message (pandas-dev#25676) ... # Conflicts: # doc/source/whatsnew/v0.25.0.rst
This is my first contribution, so please be gentle.
For future reference, this error occurs when the two files are written in different minutes. I couldn't break the comparison by feeding the test datetime objects that only changed the seconds, so I assume only the date, hours, and minutes, are encoded.
Anyway, we can't pass
False
as a keyword argument fortime_stamp
. It defaults toNone
, which internally uses the current timestamp, but otherwise expects a datetime.For testing purposes, it suffice to pass the same arbitrary timestamp as a keyword. That way it encodes the same timestamp into each file, regardless of when the test runs and how long it takes.
Instead of
False
, we could use a keyword argument like this:{'time_stamp': pd.to_datetime('2019-01-01 00:00')}