We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e25f65b commit 231704fCopy full SHA for 231704f
lib/matplotlib/tests/test_units.py
@@ -156,6 +156,17 @@ def test_jpl_barh_units():
156
ax.set_xlim([b - 1 * day, b + w[-1] + (1.001) * day])
157
158
159
+def test_jpl_datetime_units_consistent():
160
+ import matplotlib.testing.jpl_units as units
161
+ units.register()
162
+
163
+ dt = datetime(2009, 4, 26)
164
+ jpl = units.Epoch("ET", dt=dt)
165
+ dt_conv = munits.registry.get_converter(dt).convert(dt, None, None)
166
+ jpl_conv = munits.registry.get_converter(jpl).convert(jpl, None, None)
167
+ assert dt_conv == jpl_conv
168
169
170
def test_empty_arrays():
171
# Check that plotting an empty array with a dtype works
172
plt.scatter(np.array([], dtype='datetime64[ns]'), np.array([]))
0 commit comments