You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I modified the test as follows (with import re at the top of the file)
withtm.assert_produces_warning(None):
fig, ax=self.plt.subplots()
ts.plot(ax=ax)
fig.canvas.draw()
labels= [i.get_text() foriinax.get_xticklabels()]
# Extract H:M component, check first point is in correct timezone.# NOTE: this test could be updated once GH 31548 is fixed,# so that the last point is checked as well.assertre.findall(r"[^:]?(\d{2}:\d{2})", labels[0])[0] =="00:00"_check_plot_works(ts.plot)
then the test worked locally, but not during CI. Looking at the job details for linux py36_local, I could see that labels was
['01 00:01', ...1 00:51', ...]
I don't understand where that extra minute is coming from (nor can I understand why it only appears during CI).
Output of pd.show_versions()
[paste the output of pd.show_versions() here below this line]
INSTALLED VERSIONS
commit : 6e2d3ae
python : 3.7.6.final.0
python-bits : 64
OS : Linux
OS-release : 4.15.0-74-generic
machine : x86_64
processor : x86_64
byteorder : little
LC_ALL : None
LANG : en_GB.UTF-8
LOCALE : en_GB.UTF-8
@MarcoGorelli I would approach it a bit differently, and instead of testing the labels on the plot (which is very much dependent on matplotlib, they could eg change it a bit accross versions), I would maybe rather test the data values as they are plotted on the axis. Eg you can get those data with list(ax.get_lines())[0].get_xdata() (with ax the return value of df.plot()). Then could eg check that those values are the same whether you plot timezone aware or timezone naive version
Code Sample, a copy-pastable example if possible
xref #31207
If I modified the test as follows (with
import re
at the top of the file)then the test worked locally, but not during CI. Looking at the job details for linux py36_local, I could see that
labels
wasI don't understand where that extra minute is coming from (nor can I understand why it only appears during CI).
Output of
pd.show_versions()
[paste the output of
pd.show_versions()
here below this line]INSTALLED VERSIONS
commit : 6e2d3ae
python : 3.7.6.final.0
python-bits : 64
OS : Linux
OS-release : 4.15.0-74-generic
machine : x86_64
processor : x86_64
byteorder : little
LC_ALL : None
LANG : en_GB.UTF-8
LOCALE : en_GB.UTF-8
pandas : 0.26.0.dev0+2036.g6e2d3aeb6
numpy : 1.17.3
pytz : 2019.3
dateutil : 2.8.1
pip : 19.3.1
setuptools : 45.0.0.post20200113
Cython : 0.29.14
pytest : 5.3.3
hypothesis : 5.1.5
sphinx : 2.3.1
blosc : None
feather : None
xlsxwriter : 1.2.7
lxml.etree : 4.4.2
html5lib : 1.0.1
pymysql : None
psycopg2 : None
jinja2 : 2.10.3
IPython : 7.11.1
pandas_datareader: None
bs4 : 4.8.2
bottleneck : 1.3.1
fastparquet : 0.3.2
gcsfs : None
lxml.etree : 4.4.2
matplotlib : 3.1.2
numexpr : 2.7.1
odfpy : None
openpyxl : 3.0.1
pandas_gbq : None
pyarrow : 0.15.1
pytables : None
pytest : 5.3.3
pyxlsb : None
s3fs : 0.4.0
scipy : 1.4.1
sqlalchemy : 1.3.12
tables : 3.6.1
tabulate : 0.8.6
xarray : 0.14.1
xlrd : 1.2.0
xlwt : 1.3.0
xlsxwriter : 1.2.7
numba : 0.47.0
The text was updated successfully, but these errors were encountered: