Comments (2)
Based on the provided information it seems like importing the Library is unreasonably expensive
Please validate if importing lazyly removes the stall
from pytest.
Lazy loading certainly appears to bypass the stall (with mocking code commented out in the test):
# app.py
import os
# from arcgis import GIS # Moved from here to connect()
def connect():
from arcgis import GIS # Lazily load GIS from arcgis
portal = GIS(url=connection_url(domain, context), username=os.getenv('USERNAME'), username=os.getenv('PASSWORD'))
return portal
def connection_url(domain, context):
if domain == 'arcgis.com'
return None # API defaults to arcgis.com if None used as parameter
else:
return(f"https://{domain}/{context}")
pytest-richtrace
doesn't show pytest
traversing into arcgis
.
from pytest.
Related Issues (20)
- Cache: Crash on Windows when using pytest-xdist HOT 5
- It would be good to have fixtures with dinamically changed / different scopes HOT 2
- CLI flag for supporting env variables from .env file HOT 3
- Erroneous quotes in `tmp_path_retention_policy` example in docs
- Tests not collected if parametrized with `itertools` objects and imported in multiple files HOT 3
- Doctests in __main__ are ignored HOT 3
- [TODO] Upload JUnit reports to Codecov HOT 2
- No tests are run when PyTest encounters some error condition on some of them HOT 1
- Warn on test arguments with default values? HOT 1
- [8.1.x][8.3.x] `testpaths` not taken into account for initial conftests loading when set through configuration file? HOT 4
- Surprisingly, pytest doesn't collect warnings when importing the package for plugins HOT 4
- Support navigating exceptions chains in pdb
- short test summary and -vv
- --failed-first and --new-first don't play well together
- Please make something working HOT 1
- Enable test cases to be executed in a coroutine manner HOT 1
- Regression in testdir fixture HOT 8
- Fixture with session scope runs more than once unless placed in conftest.py HOT 4
- Running pytest on a file importing pandas and torch.onnx leads to access violation HOT 4
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 pytest.