Commit 3b3016e6 authored by FichteFoll's avatar FichteFoll

Run package name tests on implicitly named pckges

Also add some error strings.
parent 747e15fa
...@@ -250,12 +250,15 @@ class TestContainer(object): ...@@ -250,12 +250,15 @@ class TestContainer(object):
'The details url is badly formatted or ' 'The details url is badly formatted or '
'invalid') 'invalid')
# Test for invalid characters (on file systems) # Test for invalid characters (on file systems)
elif k == 'name': name = get_package_name(data)
# Invalid on Windows (and sometimes problematic on UNIX) # Invalid on Windows (and sometimes problematic on UNIX)
self.assertNotRegex(v, r'[/?<>\\:*|"\x00-\x19]') self.assertNotRegex(name, r'[/?<>\\:*|"\x00-\x19]',
# Invalid on OS X (or more precisely: hidden) 'Package names must be valid folder names on all '
self.assertFalse(v.startswith('.')) 'operating systems')
# Invalid on OS X (or more precisely: hidden)
self.assertFalse(name.startswith('.'), 'Package names may not start '
'with a dot')
if 'details' not in data: if 'details' not in data:
for key in ('name', 'homepage', 'author', 'releases'): for key in ('name', 'homepage', 'author', 'releases'):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment