diff --git a/scrunch/order.py b/scrunch/order.py index 77d49ddc..7c5cd84e 100644 --- a/scrunch/order.py +++ b/scrunch/order.py @@ -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 diff --git a/scrunch/tests/test_utilities.py b/scrunch/tests/test_utilities.py index 918cc57f..0f845284 100644 --- a/scrunch/tests/test_utilities.py +++ b/scrunch/tests/test_utilities.py @@ -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('|æøå')