Skip to content

Commit

Permalink
Remove Path() char validation, #377
Browse files Browse the repository at this point in the history
  • Loading branch information
jjdelc committed Sep 2, 2021
1 parent 7361a85 commit 91db5b9
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 14 deletions.
10 changes: 0 additions & 10 deletions scrunch/order.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,6 @@ def __init__(self, path):
if not isinstance(path, six.string_types):
raise TypeError('The path must be a string object')

if six.PY2:
regex_match = re.match(NAME_REGEX, path.decode('utf-8'))
else:
regex_match = re.match(NAME_REGEX, path)

if not regex_match:
raise InvalidPathError(
'Invalid path %s: it contains invalid characters.' % path
)

self.path = path

@property
Expand Down
4 changes: 0 additions & 4 deletions scrunch/tests/test_utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -296,10 +296,6 @@ def test_path(self):
Path(1234)
assert str(excinfo.value) == 'The path must be a string object'

with pytest.raises(InvalidPathError) as excinfo:
Path('|If Skadeförsäkring')
assert str(excinfo.value) == 'Invalid path |If Skadeförsäkring: it contains invalid characters.'

Path('|If Skadeförsäkring')
Path('|æøå')

Expand Down

0 comments on commit 91db5b9

Please sign in to comment.