Commit ddac4b1e authored by FichteFoll's avatar FichteFoll

Add tests for the order of repositories in channel.json

parent c58ed6c4
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,6 @@
"./repository.json", "./repository.json",
"http://release.latexing.com/packages.json", "http://release.latexing.com/packages.json",
"http://release.sublimegit.net/packages.json", "http://release.sublimegit.net/packages.json",
"https://sublime.wbond.net/packages_2.json",
"http://wuub.net/packages.json", "http://wuub.net/packages.json",
"https://bitbucket.org/artyom_smirnov/sublimetext2-packages/raw/master/packages.json", "https://bitbucket.org/artyom_smirnov/sublimetext2-packages/raw/master/packages.json",
"https://bitbucket.org/jjones028/p4sublime/raw/tip/packages.json", "https://bitbucket.org/jjones028/p4sublime/raw/tip/packages.json",
...@@ -151,6 +150,7 @@ ...@@ -151,6 +150,7 @@
"https://raw.github.com/yangsu/sublime-io/master/packages.json", "https://raw.github.com/yangsu/sublime-io/master/packages.json",
"https://raw.github.com/yangsu/sublime-octopress/master/packages.json", "https://raw.github.com/yangsu/sublime-octopress/master/packages.json",
"https://raw.github.com/yangsu/sublime-vhdl/master/packages.json", "https://raw.github.com/yangsu/sublime-vhdl/master/packages.json",
"https://raw.github.com/zfkun/sublime-kissy-snippets/master/packages.json" "https://raw.github.com/zfkun/sublime-kissy-snippets/master/packages.json",
"https://sublime.wbond.net/packages_2.json"
] ]
} }
...@@ -80,6 +80,8 @@ def get_package_name(data): ...@@ -80,6 +80,8 @@ def get_package_name(data):
################################################################################ ################################################################################
class ChannelTests(unittest.TestCase): class ChannelTests(unittest.TestCase):
maxDiff = None
with _open('channel.json') as f: with _open('channel.json') as f:
j = json.load(f) j = json.load(f)
...@@ -93,6 +95,10 @@ class ChannelTests(unittest.TestCase): ...@@ -93,6 +95,10 @@ class ChannelTests(unittest.TestCase):
for repo in self.j['repositories']: for repo in self.j['repositories']:
self.assertIsInstance(repo, str) self.assertIsInstance(repo, str)
def test_channel_repo_order(self):
repos = self.j['repositories']
self.assertEqual(repos, sorted(repos, key=str.lower))
@generator_class @generator_class
class RepositoryTests(unittest.TestCase): class RepositoryTests(unittest.TestCase):
......
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