Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F9749477
D5467.id19536.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
943 B
Subscribers
None
D5467.id19536.diff
View Options
diff --git a/tox.ini b/tox.ini
--- a/tox.ini
+++ b/tox.ini
@@ -1,5 +1,5 @@
[tox]
-envlist=black,flake8,mypy,py3,identify
+envlist=black,flake8,mypy,py3,identify,identify-base
[testenv]
extras =
@@ -21,6 +21,25 @@
commands =
pytest {envsitepackagesdir}/swh/model/tests/test_cli.py
+[testenv:identify-base]
+# Tests swh-identify works even with the bare minimum of dependencies install
+# (eg. no dulwich)
+extras =
+deps =
+ Click
+ pytest
+commands =
+ # Run all tests that don't depend on dulwich:
+ pytest {envsitepackagesdir}/swh/model/tests/test_cli.py -k 'not snapshot'
+ # Check we get a nice error if we depend on dulwich:
+ /usr/bin/env bash -c " \
+ # run swh-identify, should have non-zero exit code (ie. error)
+ ! swh-identify -t snapshot . 2>&1 \
+ # check the output contains the error message
+ | (! grep 'Dulwich package') \
+ > /dev/null \
+ "
+
[testenv:black]
skip_install = true
deps =
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Aug 24, 5:34 PM (5 d, 20 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3225453
Attached To
D5467: tox: Check swh-identify can run even if Dulwich isn't installed
Event Timeline
Log In to Comment