generated from jCloud/repository-template
Do not permit empty python namespace names
This commit is contained in:
@@ -4,11 +4,9 @@ import pytest
|
||||
class StrSubclass(str): ...
|
||||
|
||||
@pytest.mark.parametrize('namespace,expected_name', [
|
||||
(PythonModuleNamespace(''), ''),
|
||||
(PythonModuleNamespace(' '), ' '),
|
||||
(PythonModuleNamespace('a'), 'a'),
|
||||
(PythonModuleNamespace('1'), '1'),
|
||||
(PythonModuleNamespace(StrSubclass('')), StrSubclass('')),
|
||||
(PythonModuleNamespace(StrSubclass('a')), StrSubclass('a')),
|
||||
])
|
||||
def test_PythonModuleNamespace_name_attribute(namespace, expected_name):
|
||||
assert namespace.name == expected_name
|
||||
|
||||
@@ -4,11 +4,9 @@ import pytest
|
||||
class StrSubclass(str): ...
|
||||
|
||||
@pytest.mark.parametrize('namespace,expected_name', [
|
||||
(PythonNamespace(''), ''),
|
||||
(PythonNamespace(' '), ' '),
|
||||
(PythonNamespace('a'), 'a'),
|
||||
(PythonNamespace('1'), '1'),
|
||||
(PythonNamespace(StrSubclass('')), StrSubclass('')),
|
||||
(PythonNamespace(StrSubclass('a')), StrSubclass('a')),
|
||||
])
|
||||
def test_PythonNamespace_name_attribute(namespace, expected_name):
|
||||
assert namespace.name == expected_name
|
||||
Reference in New Issue
Block a user