Do not allow to provide absolute paths as filesystem will join it silently (fixes #211).
This commit is contained in:
12
tests/nodes/io/test_io_base.py
Normal file
12
tests/nodes/io/test_io_base.py
Normal 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"
|
||||
Reference in New Issue
Block a user