Skip to content
Snippets Groups Projects
Commit 68b91790 authored by Henrik tom Wörden's avatar Henrik tom Wörden
Browse files

TST: add test for remove_prefix with bad value

parent 2123b1cb
Branches
Tags
2 merge requests!105REL: v0.4.0,!101ENH: add the 'add_prefix' argument
Pipeline #34099 failed
......@@ -28,11 +28,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Deprecated ###
- The command line argument ``--prefix`` and the ``prefix`` argument of
`crawler_main` is deprecated. Use the new argument ``--remove-prefix``
instead.
- The ``prefix`` argument of `crawler_main` is deprecated. Use the new argument
``remove_prefix`` instead.
### Removed ###
- The command line argument ``--prefix``. Use the new argument ``--remove-prefix`` instead.
### Fixed ###
......
......@@ -982,3 +982,14 @@ def test_deprecated_prefix_option():
remove_prefix="to/be/removed")
assert "(deprecated) `prefix` and the `remove_prefix`" in str(ve.value)
def test_wrong_remove_prefix_option():
"""Test that calling the crawler's main function with `remove_prefix` option
with a bad value raises the correct error.
"""
with raises(RuntimeError) as ve:
crawler_main(rfp("test_directories", "examples_article"),
rfp("scifolder_extended.yml"),
remove_prefix="to/be/removed")
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment