-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
TST: fixed cython doctests #43768
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
TST: fixed cython doctests #43768
Changes from 15 commits
e16b820
3ec8bb6
2dbec17
79dda1d
4e33b9a
d8e68be
619cbf8
0382d63
a3a0732
5d2f9df
3b2e4ed
d1b207f
7036a96
eeeabf8
51f1681
d822fc5
968c5ca
fb2820a
1fb4815
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -122,3 +122,4 @@ dependencies: | |
- types-PyMySQL | ||
- types-pytz | ||
- types-setuptools | ||
- pytest-cython |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -385,24 +385,26 @@ def tz_standardize(tz: tzinfo) -> tzinfo: | |
------- | ||
tzinfo | ||
|
||
Examples: | ||
Examples | ||
-------- | ||
>>> from datetime import datetime | ||
>>> from pytz import timezone | ||
>>> tz = timezone('US/Pacific').normalize(datetime(2014,1,1, \ | ||
tzinfo=pytz.utc)).tzinfo | ||
debnathshoham marked this conversation as resolved.
Show resolved
Hide resolved
|
||
>>> tz | ||
<DstTzInfo 'US/Pacific' PST-1 day, 16:00:00 STD> | ||
|
||
>>> tz_standardize(tz) | ||
<DstTzInfo 'US/Pacific' LMT-1 day, 16:07:00 STD> | ||
|
||
>>> tz = timezone('US/Pacific') | ||
>>> tz | ||
<DstTzInfo 'US/Pacific' LMT-1 day, 16:07:00 STD> | ||
|
||
>>> tz_standardize(tz) | ||
<DstTzInfo 'US/Pacific' LMT-1 day, 16:07:00 STD> | ||
|
||
>>> tz | ||
>>> tz # doctest: +SKIP | ||
dateutil.tz.tz.tzutc | ||
|
||
>>> tz_standardize(tz) | ||
>>> tz_standardize(tz) # doctest: +SKIP | ||
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. why does this need skipping? 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. I am not able to replicate this example In [33]: from dateutil.tz.tz import tzutc as tz
In [34]: tz
Out[34]: dateutil.tz.tz.tzutc
In [35]: from pandas._libs.tslibs.timezones import tz_standardize
In [36]: tz_standardize(tz)
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-36-94d2ff882b92> in <module>
----> 1 tz_standardize(tz)
TypeError: Argument 'tz' has incorrect type (expected datetime.tzinfo, got _TzSingleton) 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. @jreback sorry to unresolve this, but can this example be removed if it can't be run? |
||
dateutil.tz.tz.tzutc | ||
""" | ||
if treat_tz_as_pytz(tz): | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -85,4 +85,5 @@ types-python-dateutil | |
types-PyMySQL | ||
types-pytz | ||
types-setuptools | ||
pytest-cython | ||
setuptools>=51.0.0 |
Uh oh!
There was an error while loading. Please reload this page.