Merge pull request #332 from hartym/211_forbid_fs_related_nodes_to_join_cwd_silently

Do not allow to provide absolute paths as filesystem will join it sil…
This commit is contained in:
Romain Dorgueil
2019-06-01 11:07:16 +02:00
committed by GitHub
2 changed files with 26 additions and 32 deletions

View File

@ -0,0 +1,12 @@
import pytest
from bonobo.nodes.io.base import filesystem_path
def test_filesystem_path_absolute():
with pytest.raises(ValueError):
filesystem_path("/this/is/absolute")
def test_filesystem_path_relative():
assert filesystem_path("this/is/relative") == "this/is/relative"