Skip to content

Commit

Permalink
test_templates.py: use unambiguous BSD-3-Clause license instead of ju…
Browse files Browse the repository at this point in the history
…st BSD
  • Loading branch information
shr-project committed Sep 18, 2020
1 parent 0734ae0 commit 20c9bf1
Show file tree
Hide file tree
Showing 13 changed files with 24 additions and 24 deletions.
2 changes: 1 addition & 1 deletion test/data/metapackages/NonConformingName/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<description>valid_metapackage</description>

<maintainer email="user@todo.todo">user</maintainer>
<license>BSD</license>
<license>BSD-3-Clause</license>
<buildtool_depend>catkin</buildtool_depend>

<run_depend>foo</run_depend>
Expand Down
2 changes: 1 addition & 1 deletion test/data/metapackages/invalid_cmake/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<description>invalid_cmake</description>

<maintainer email="user@todo.todo">user</maintainer>
<license>BSD</license>
<license>BSD-3-Clause</license>
<buildtool_depend>catkin</buildtool_depend>

<run_depend>foo</run_depend>
Expand Down
2 changes: 1 addition & 1 deletion test/data/metapackages/invalid_depends/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<description>invalid_depends</description>

<maintainer email="user@todo.todo">user</maintainer>
<license>BSD</license>
<license>BSD-3-Clause</license>
<buildtool_depend>catkin</buildtool_depend>

<run_depend>foo</run_depend>
Expand Down
2 changes: 1 addition & 1 deletion test/data/metapackages/leftover_files/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<description>leftover_files</description>

<maintainer email="user@todo.todo">user</maintainer>
<license>BSD</license>
<license>BSD-3-Clause</license>
<buildtool_depend>catkin</buildtool_depend>

<run_depend>foo</run_depend>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<description>no_buildtool_depend_catkin</description>

<maintainer email="user@todo.todo">user</maintainer>
<license>BSD</license>
<license>BSD-3-Clause</license>

<run_depend>foo</run_depend>
<run_depend>bar</run_depend>
Expand Down
2 changes: 1 addition & 1 deletion test/data/metapackages/no_cmake/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<description>no_cmake</description>

<maintainer email="user@todo.todo">user</maintainer>
<license>BSD</license>
<license>BSD-3-Clause</license>
<buildtool_depend>catkin</buildtool_depend>

<run_depend>foo</run_depend>
Expand Down
2 changes: 1 addition & 1 deletion test/data/metapackages/no_metapackage_tag/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<description>no_metapackage_tag</description>

<maintainer email="user@todo.todo">user</maintainer>
<license>BSD</license>
<license>BSD-3-Clause</license>
<buildtool_depend>catkin</buildtool_depend>

<run_depend>foo</run_depend>
Expand Down
2 changes: 1 addition & 1 deletion test/data/metapackages/valid_metapackage/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<description>valid_metapackage</description>

<maintainer email="user@todo.todo">user</maintainer>
<license>BSD</license>
<license>BSD-3-Clause</license>
<buildtool_depend>catkin</buildtool_depend>

<run_depend>foo</run_depend>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<description>valid_metapackage</description>

<maintainer email="user@todo.todo">user</maintainer>
<license>BSD</license>
<license>BSD-3-Clause</license>
<buildtool_depend>catkin</buildtool_depend>

<exec_depend>foo</exec_depend>
Expand Down
2 changes: 1 addition & 1 deletion test/data/package/valid_package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<description>valid_package description</description>

<maintainer email="user@todo.todo">üser</maintainer>
<license>BSD</license>
<license>BSD-3-Clause</license>
<buildtool_depend>catkin</buildtool_depend>

<run_depend>foo</run_depend>
Expand Down
2 changes: 1 addition & 1 deletion test/test_catkin_create_pkg.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def test_create_package_template(self):
template = PackageTemplate._create_package_template(
'foopackage',
description='foo_desc',
licenses=['a', 'b'],
licenses=['BSD-3-Clause'],
maintainer_names=['John Doe', 'Jim Daniels'],
author_names=['Harry Smith'],
version='1.2.3',
Expand Down
14 changes: 7 additions & 7 deletions test/test_package.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,14 @@ def test_init(self):
pack = Package(name='foo',
version='0.0.0',
maintainers=[maint],
licenses=['BSD'])
licenses=['BSD-3-Clause'])
self.assertEqual(None, pack.filename)
self.assertEqual('0.0.0', pack.version)
self.assertEqual(None, pack.version_compatibility)
self.assertEqual([], pack.urls)
self.assertEqual([], pack.authors)
self.assertEqual([maint], pack.maintainers)
self.assertEqual(['BSD'], pack.licenses)
self.assertEqual(['BSD-3-Clause'], pack.licenses)
self.assertEqual([None], [license_.file for license_ in pack.licenses])
self.assertEqual([], pack.build_depends)
self.assertEqual([], pack.buildtool_depends)
Expand All @@ -68,7 +68,7 @@ def test_init(self):
pack = Package('foo',
name='bar',
version='0.0.0',
licenses=['BSD'],
licenses=['BSD-3-Clause'],
maintainers=[self.get_maintainer()])
self.assertEqual('foo', pack.filename)

Expand Down Expand Up @@ -161,7 +161,7 @@ def test_init_kwargs_string(self):
version='0.0.1',
version_compatibility='0.0.0',
description='pdesc',
licenses=['BSD'],
licenses=['BSD-3-Clause'],
maintainers=[self.get_maintainer()])
self.assertEqual('foo', pack.filename)
self.assertEqual('bar', pack.name)
Expand All @@ -172,7 +172,7 @@ def test_init_kwargs_string(self):

def test_init_kwargs_object(self):
mmain = [self.get_maintainer(), self.get_maintainer()]
mlis = ['MIT', License('BSD', 'LICENSE')]
mlis = ['MIT', License('BSD-3-Clause', 'LICENSE')]
mauth = [self.get_maintainer(), self.get_maintainer()]
murl = [Mock(), Mock()]
mbuilddep = [Mock(), Mock()]
Expand Down Expand Up @@ -226,7 +226,7 @@ def test_validate_package(self):
package_format='1',
version='0.0.1',
description='pdesc',
licenses=['BSD'],
licenses=['BSD-3-Clause'],
maintainers=[maint])
pack.validate()

Expand Down Expand Up @@ -354,7 +354,7 @@ def test_parse_package_valid(self):
assert package.name == 'valid_package'
assert package.description == 'valid_package description'
assert package.version == '0.1.0'
assert package.licenses == ['BSD']
assert package.licenses == ['BSD-3-Clause']
assert [x.name for x in package.run_depends] == ['foo', 'bar', 'baz']

def test_parse_package_invalid(self):
Expand Down
12 changes: 6 additions & 6 deletions test/test_templates.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def test_create_package_xml(self):
description='foo',
version='0.0.0',
maintainers=[maint],
licenses=['BSD'])
licenses=['BSD-3-Clause'])

result = create_package_xml(pack, 'groovy')
self.assertTrue('<name>foo</name>' in result, result)
Expand Down Expand Up @@ -136,7 +136,7 @@ def test_create_package(self):
version='0.0.1',
version_compatibility='0.0.0',
maintainers=[maint],
licenses=['BSD'])
licenses=['BSD-3-Clause'])
try:
rootdir = tempfile.mkdtemp()
file1 = os.path.join(rootdir, 'CMakeLists.txt')
Expand All @@ -163,7 +163,7 @@ def test_parse_generated(self):
urls=[Url('foo')],
description='pdesc',
maintainers=[maint],
licenses=['BSD'])
licenses=['BSD-3-Clause'])
try:
rootdir = tempfile.mkdtemp()
file1 = os.path.join(rootdir, 'CMakeLists.txt')
Expand Down Expand Up @@ -197,7 +197,7 @@ def test_parse_generated(self):
'maintainer': u('John Foo'),
'maintainer_email': 'foo@bar.com',
'description': 'pdesc',
'license': 'BSD',
'license': 'BSD-3-Clause',
'version': '0.0.1',
'author': '',
'url': 'foo'}, rdict)
Expand All @@ -214,7 +214,7 @@ def test_parse_generated_multi(self):
description='pdesc',
maintainers=[maint, maint],
authors=[maint, maint],
licenses=['BSD', 'MIT'],
licenses=['BSD-3-Clause', 'MIT'],
urls=[Url('foo', 'bugtracker'), Url('bar')],
build_depends=[Dependency('dep1')],
buildtool_depends=[Dependency('dep2'),
Expand Down Expand Up @@ -280,7 +280,7 @@ def assertEqualDependencies(deplist1, deplist2):
self.assertEqual({'name': 'bar',
'maintainer': u('John Foo <foo@bar.com>, John Foo <foo@bar.com>'),
'description': 'pdesc',
'license': 'BSD, MIT',
'license': 'BSD-3-Clause, MIT',
'version': '0.0.1',
'author': u('John Foo <foo@bar.com>, John Foo <foo@bar.com>'),
'url': 'bar'}, rdict)
Expand Down

0 comments on commit 20c9bf1

Please sign in to comment.