Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitda6b1fe

Browse files
authored
Merge pull request#20823 from meeseeksmachine/auto-backport-of-pr-20817-on-v3.4.x
Backport PR#20817 on branch v3.4.x (Make test_change_epoch more robust.)
2 parents7d5754e +7cf7368 commitda6b1fe

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

‎lib/matplotlib/tests/test_dates.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1004,12 +1004,15 @@ def test_datetime64_in_list():
10041004
deftest_change_epoch():
10051005
date=np.datetime64('2000-01-01')
10061006

1007+
# use private method to clear the epoch and allow it to be set...
1008+
mdates._reset_epoch_test_example()
1009+
mdates.get_epoch()# Set default.
1010+
10071011
withpytest.raises(RuntimeError):
10081012
# this should fail here because there is a sentinel on the epoch
10091013
# if the epoch has been used then it cannot be set.
10101014
mdates.set_epoch('0000-01-01')
10111015

1012-
# use private method to clear the epoch and allow it to be set...
10131016
mdates._reset_epoch_test_example()
10141017
mdates.set_epoch('1970-01-01')
10151018
dt= (date-np.datetime64('1970-01-01')).astype('datetime64[D]')

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp