Commit bb8c4b92 authored by FichteFoll's avatar FichteFoll

Add tests for redundant name mappings

parent 02c8ede3
......@@ -1360,7 +1360,6 @@
"browsersupport": "Browser Support",
"bs3-sublime-plugin": "Bootstrap 3 Snippets",
"Bubububububad": "Bubububububad and Boneyfied Color Schemes",
"BuildParts": "BuildParts",
"BuildView": "Shows build output in a view",
"cakephp-tmbundle": "CakePHP (tmbundle)",
"Cappuccino-Sublime": "Cappuccino",
......@@ -2224,7 +2223,6 @@
"Tritium.tmbundle": "Tritium",
"tubaina-afc": "Tubaina (afc)",
"ublime": "Ublime Color Schemes",
"Unity3D": "Unity3D",
"Unity3d-LeanTween-Snippets": "Unity3d LeanTween Snippets",
"Unity3D-Shader" : "Unity3D Shader Highlighter and Snippets",
"Unity3DScriptReference": "Unity3D Script Reference Search",
......
......@@ -22,7 +22,7 @@ repo_file = "repositories.json"
# json.load(fp)
class TestOrder(unittest.TestCase):
class TestContents(unittest.TestCase):
# Do not limit the list comparison to 600 chars (for more detailed debugging)
maxDiff = None
......@@ -44,6 +44,16 @@ class TestOrder(unittest.TestCase):
ren_packages = list(self.j['renamed_packages'].keys())
self.assertEqual(ren_packages, sorted(ren_packages, key=str.lower))
def test_name_map_redundancy(self):
for k, v in self.j['package_name_map'].items():
if k == v:
raise ValueError("Package '%s' maps to itself" % k)
def test_rename_map_redundancy(self):
for k, v in self.j['renamed_packages'].items():
if k == v:
raise ValueError("Package '%s' renames to itself" % k)
if __name__ == '__main__':
# Manually go up one directory if this file is run explicitly
......
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