-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
PKG/DEP: Make importable without pytest #16088
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
Conversation
Actually, thinking more about this I probably prefer removing the line from panads.init and have people import it separately
|
Since edit: actually this is lot less trivial than I was originally thinking, so maybe not a good idea |
Looking at testing.py again - almost every use |
OK, let me give this a shot. |
cf629d3
to
ed1ca67
Compare
Codecov Report
@@ Coverage Diff @@
## master #16088 +/- ##
=========================================
Coverage ? 90.84%
=========================================
Files ? 159
Lines ? 50780
Branches ? 0
=========================================
Hits ? 46132
Misses ? 4648
Partials ? 0
Continue to review full report at Codecov.
|
Ok, not too bad at all. Hopefully this passes. And here it is working without pytest, which is nice In [1]: import pandas as pd
In [2]: pd.testing.assert_series_equal(pd.Series([1]), pd.Series([2]))
---------------------------------------------------------------------------
AssertionError Traceback (most recent call last)
<ipython-input-2-46d7e85da706> in <module>()
----> 1 pd.testing.assert_series_equal(pd.Series([1]), pd.Series([2]))
/Users/taugspurger/Envs/pandas-dev/lib/python3.6/site-packages/pandas/pandas/util/testing.py in assert_series_equal(left, right, check_dtype, check_index_type, check_series_type, check_less_precise, check_names, check_exact, check_datetimelike_compat, check_categorical, obj)
1310 check_less_precise=check_less_precise,
1311 check_dtype=check_dtype,
-> 1312 obj='{0}'.format(obj))
1313
1314 # metadata comparison
as/pandas/util/testing.pyx in pandas.util.libtesting.assert_almost_equal (pandas/util/testing.c:4156)()
as/pandas/util/testing.pyx in pandas.util.libtesting.assert_almost_equal (pandas/util/testing.c:3274)()
/Users/taugspurger/Envs/pandas-dev/lib/python3.6/site-packages/pandas/pandas/util/testing.py in raise_assert_detail(obj, message, left, right, diff)
1137 msg = msg + "\n[diff]: {diff}".format(diff=diff)
1138
-> 1139 raise AssertionError(msg)
1140
1141
AssertionError: Series are different
Series values are different (100.0 %)
[left]: [1]
[right]: [2] |
@TomAugspurger btw, make sure you can locally conda build (or pip), install into a fresh env and do a also after you tag, but before pushing, make sure the same works for the |
thanks @TomAugspurger |
Closes #16065
Edit: removed the top-level imports of pytest in pandas.util.testing