Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Add datetime testing for boxplot#27038
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:main
Are you sure you want to change the base?
Uh oh!
There was an error while loading.Please reload this page.
Changes fromall commits
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||
---|---|---|---|---|---|---|---|---|
@@ -224,8 +224,17 @@ def test_barh(self): | ||||||||
@pytest.mark.xfail(reason="Test for boxplot not written yet") | ||||||||
@mpl.style.context("default") | ||||||||
def test_boxplot(self): | ||||||||
data = [datetime.datetime(2023, 10, 5, 18, 52, 59), | ||||||||
datetime.datetime(2023, 10, 4, 18, 53, 0), | ||||||||
datetime.datetime(2023, 10, 3, 18, 53, 1), | ||||||||
datetime.datetime(2023, 10, 2, 18, 53, 2), | ||||||||
datetime.datetime(2023, 10, 1, 18, 53, 3)] | ||||||||
datums = np.array([datetime.datetime.toordinal(d) for d in data]) | ||||||||
plt.boxplot(datums, labels=['my data'], showfliers=True) | ||||||||
Comment on lines +232 to +233 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. Suggested change
We actually very specificallywant the datetimes passed into the plotting methods here. as it stands, this test is not actually testing the unit conversion at all. | ||||||||
plt.xlabel('Datetime') | ||||||||
plt.ylabel('value') | ||||||||
plt.title('Boxplot of datetime data') | ||||||||
plt.show() | ||||||||
@mpl.style.context("default") | ||||||||
def test_broken_barh(self): | ||||||||