Comments (1)
@tarunsamanta2k20 I don't know if what I am going to suggest is anywhere close to correct but this is what came to mind reading this:
First I would edit Makefile to duplicate the "test" target and add -m "not network"
to the pytest call something like:
test-offline:
# Run a tmp folder to make sure the tests are run on the installed version
mkdir -p $(TESTDIR)
cd $(TESTDIR); pytest $(PYTEST_ARGS) -m "not network" $(PROJECT)
cp $(TESTDIR)/.coverage* .
rm -r $(TESTDIR)
Based on https://docs.pytest.org/en/7.1.x/example/markers.html this should tell pytest to skip the tests that are labeled with "@pytest.mark.network".
After adding the new target to Makefile you should be able to run make test
(full suite) or make test-offline
(everything not marked network).
But I don't know how cache's affect things and whether pooch's tests already bypass cache. I suspect there's a way to point pooch at a temporary empty directory instead of the default cache. make test
may already do that.
From there you can probably figure out which tests are using network by comparing runs of make test-offline
while taking your computer on/offline and noticing changes in pass/fail status.
This is just my initial idea about how to go about it. At some point someone might think about whether there's an automated way to detect whether tests have been incorrectly marked as network
.
from pooch.
Related Issues (20)
- DataVerse file DOIs in pooch.retrieve HOT 1
- Pooch 1.7.0 fails when filenames have apostrophes HOT 9
- Download from URL with expired SSL certificate HOT 4
- Problem accessing public files on Dropbox HOT 4
- Add support for downloading from AWS S3 butckets HOT 1
- If Unzip/Untar fails because of a non-existent member, calling without members won't work HOT 2
- Feature: allow null hash in registry files HOT 3
- pooch.make_registry does not handle spaces in filenames correctly HOT 1
- `KeyError: 'key'` in ZenodoRepository.download_url() after Zenodo migration HOT 8
- Mention in docs that registry files must use POSIX compatible file names
- Release v1.8.0 HOT 1
- Sorry wrong repo for the issue HOT 1
- fatiando.org is down HOT 2
- Add "git blob hash" as available hash HOT 3
- Add or document support for Dryad via DOIDownloader HOT 1
- Add support for downloading from Azure cloud storage HOT 2
- Release v1.8.1 HOT 2
- Add support for downloading from Google Cloud Storage HOT 5
- Increase timeout on HTTP requests and use a variable HOT 12
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 pooch.