Comments (5)
It seems we also have a bunch of actual failures that might also be related to pytest 8? (I don't see much other potentially related packages that updated versions the last week)
from geopandas.
@m-richards can you point me to the report where this happens? From those few I clicked on, the failures and errors were on the very bottom as usual.
@jorisvandenbossche that was dev version of xyzservices broken by botched upstream PR in leaflet-provides. All green now.
from geopandas.
See https://github.com/geopandas/geopandas/actions/runs/7770406362/job/21190571888 for example - the errors are at the very bottom, but to see the error traceback you now have to scroll up through ~900 lines of xfailure tracebacks.
Maybe this is just something to get used to, but I found it super confusing at first to see all these keyerrors /attributeerrors in red but then realised they're all in the xfailed section
from geopandas.
Oh, the tracebacks. Yes, agree that we don't need this kind of verbosity for xfails.
from geopandas.
I don't fully understand how pytest intends this to be configured ..
An example test file where we have one xfailing test:
$ pytest geopandas/tests/test_op_output_types.py -r fEx
================================== test session starts ================================================
platform linux -- Python 3.11.0, pytest-8.0.0, pluggy-1.4.0
rootdir: /home/joris/scipy/repos/geopandas
configfile: pyproject.toml
plugins: anyio-4.0.0
collected 33 items
geopandas/tests/test_op_output_types.py .....x...........................
================================ 32 passed, 1 xfailed in 0.79s ========================================
With the default settings of only showing the "extra test summary" for failures and Errors (-r fE
), the above doesn't actually list which tests are xfailing (it just says there was 1 xfailed test)
When enabling the test summary for xfailures as well:
$ pytest geopandas/tests/test_op_output_types.py -r fEx
===================================== test session starts ======================================
platform linux -- Python 3.11.0, pytest-8.0.0, pluggy-1.4.0
rootdir: /home/joris/scipy/repos/geopandas
configfile: pyproject.toml
plugins: anyio-4.0.0
collected 33 items
geopandas/tests/test_op_output_types.py .....x........................... [100%]
========================================== XFAILURES ===========================================
____________________________________ test_loc_add_row[geom] ____________________________________
geom_name = 'geom'
nybb_filename = 'zip:///home/joris/scipy/repos/geopandas/geopandas/tests/data/nybb_16a.zip'
@pytest.mark.parametrize(
"geom_name",
[
"geometry",
pytest.param(
"geom",
marks=pytest.mark.xfail(
reason="pre-regression behaviour only works for geometry col geometry"
),
),
],
)
def test_loc_add_row(geom_name, nybb_filename):
# https://github.com/geopandas/geopandas/issues/3119
nybb = geopandas.read_file(nybb_filename)[["BoroCode", "geometry"]]
if geom_name != "geometry":
nybb = nybb.rename_geometry(geom_name)
# crs_orig = nybb.crs
# add a new row
nybb.loc[5] = [6, nybb.geometry.iloc[0]]
> assert nybb.geometry.dtype == "geometry"
E AssertionError: assert dtype('O') == 'geometry'
E + where dtype('O') = 0 MULTIPOLYGON (((970217.0223999023 145643.33221...\n1 MULTIPOLYGON (((1029606.0765991211 156073.8142...\n2 MUL...N (((1012821.8057861328 229228.2645...\n5 MULTIPOLYGON (((970217.0223999023 145643.33221...\nName: geom, dtype: object.dtype
E + where 0 MULTIPOLYGON (((970217.0223999023 145643.33221...\n1 MULTIPOLYGON (((1029606.0765991211 156073.8142...\n2 MUL...N (((1012821.8057861328 229228.2645...\n5 MULTIPOLYGON (((970217.0223999023 145643.33221...\nName: geom, dtype: object = BoroCode geom\n0 5 MULTIPOLYGON (((970217.0223999023 145643.3... 2 MULTIPOLYGON (((1012821.8057861328 229228.2645...\n5 6 MULTIPOLYGON (((970217.0223999023 145643.33221....geometry
geopandas/tests/test_op_output_types.py:170: AssertionError
=================================== short test summary info ====================================
XFAIL geopandas/tests/test_op_output_types.py::test_loc_add_row[geom] - pre-regression behaviour only works for geometry col geometry
================================ 32 passed, 1 xfailed in 0.86s =================================
The xfailed test is shown both in the verbose printing of xfailures (like a test failure, pointing to the assert line that is failing), and in the test summary.
I would personally like to keep the list of xfails in the short test summary (it gives them some visibility), but definitely don't want their verbose output. This is indeed way too verbose for something we know is happening, making it hard to check the verbose output of the actual tests.
Now, I don't see how I can get pytest to just show the short test summary for xfails. So then let's just disable xfails altogether for now, as it's more important to get rid of the verbosity.
from geopandas.
Related Issues (20)
- GeoPandas 1.0 release HOT 11
- MAINT: Fiona 1.10 support HOT 4
- BUG: up to 4 times slower in Linux compared to Windows when using gpd.read_file to read vector data HOT 6
- BUG: Is it possible to use GeoPandas on Windows 7 ?
- BUG: Unable to append to a layer when using fiona backend HOT 3
- BUG: plotting_with_geoplot example is broken HOT 1
- ENH: Add a Voronoi Diagram algorithm HOT 1
- BUG: The dissolve feature generates a new geometry HOT 4
- REGR: incorrect order of left sjoin with within predicate HOT 1
- BUG: wrong foxpro DBF file read HOT 7
- Fiona 1.10a2 issues HOT 2
- ENH: support writing + filtered reading from bbox columns in GeoParquet HOT 4
- ENH: support reading and writing the geoarrow-based encodings of GeoParquet
- API: Series alignment for non binary op methods HOT 5
- PERF: optimize `==` and `!=` for GeoSeries (`GeometryArray.__eq__`)
- numpy dependency missing & numpy 2.0 support status? HOT 3
- ENH: inplace=True for .dissolve and .explode? HOT 4
- BUG: `pyogrio` doesn't like io.BytesIO? HOT 10
- BUG: Issue with webpage code interp HOT 1
- ENH: sjoin() should allow to return the distance when using the dwithin predicate, just like sjoin_nearest() HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from geopandas.