diff options
-rw-r--r-- | morphlib/builder.py | 1 | ||||
-rw-r--r-- | morphlib/git.py | 2 | ||||
-rw-r--r-- | morphlib/sourcemanager.py | 6 | ||||
-rw-r--r-- | morphlib/sourcemanager_tests.py | 29 | ||||
-rw-r--r-- | tests/missing-ref.stderr | 2 |
5 files changed, 20 insertions, 20 deletions
diff --git a/morphlib/builder.py b/morphlib/builder.py index 3ec7f740..d1585953 100644 --- a/morphlib/builder.py +++ b/morphlib/builder.py @@ -17,6 +17,7 @@ import json import logging import os +import urlparse import morphlib diff --git a/morphlib/git.py b/morphlib/git.py index 2253e6b5..8260312f 100644 --- a/morphlib/git.py +++ b/morphlib/git.py @@ -1,4 +1,4 @@ -# Copyright (C) 2011 Codethink Limited +# Copyright (C) 2011-2012 Codethink Limited # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/morphlib/sourcemanager.py b/morphlib/sourcemanager.py index 73b1c72b..a887f6e0 100644 --- a/morphlib/sourcemanager.py +++ b/morphlib/sourcemanager.py @@ -1,4 +1,4 @@ -# Copyright (C) 2011 Codethink Limited +# Copyright (C) 2012 Codethink Limited # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -14,13 +14,9 @@ # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -import json -import logging import os import urlparse -import urllib import urllib2 -import errno import string import morphlib diff --git a/morphlib/sourcemanager_tests.py b/morphlib/sourcemanager_tests.py index 0c24f30d..65664e07 100644 --- a/morphlib/sourcemanager_tests.py +++ b/morphlib/sourcemanager_tests.py @@ -1,4 +1,4 @@ -# Copyright (C) 2011 Codethink Limited +# Copyright (C) 2012 Codethink Limited # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -14,15 +14,11 @@ # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -import json -import StringIO import unittest import tempfile import shutil import os -import urllib from urlparse import urlparse -from tempfile import mkdtemp import morphlib @@ -44,7 +40,8 @@ class SourceManagerTests(unittest.TestCase): tempdir = tempfile.mkdtemp() s = morphlib.sourcemanager.SourceManager(tempdir, DummyApp()) - t = s.get_treeish(os.getcwd(),'41ee528492db9bd41604311b100da5a871098b3a') + t = s.get_treeish(os.getcwd(), + '41ee528492db9bd41604311b100da5a871098b3a') assert(t.sha1 == '41ee528492db9bd41604311b100da5a871098b3a') shutil.rmtree(tempdir) @@ -53,11 +50,13 @@ class SourceManagerTests(unittest.TestCase): tempdir = tempfile.mkdtemp() s = morphlib.sourcemanager.SourceManager(tempdir, DummyApp()) - t = s.get_treeish(os.getcwd(),'41ee528492db9bd41604311b100da5a871098b3a') + t = s.get_treeish(os.getcwd(), + '41ee528492db9bd41604311b100da5a871098b3a') assert(t.sha1 == '41ee528492db9bd41604311b100da5a871098b3a') s = morphlib.sourcemanager.SourceManager(tempdir, DummyApp()) - t = s.get_treeish(os.getcwd(),'41ee528492db9bd41604311b100da5a871098b3a') + t = s.get_treeish(os.getcwd(), + '41ee528492db9bd41604311b100da5a871098b3a') assert(t.sha1 == '41ee528492db9bd41604311b100da5a871098b3a') shutil.rmtree(tempdir) @@ -66,7 +65,7 @@ class SourceManagerTests(unittest.TestCase): tempdir = tempfile.mkdtemp() s = morphlib.sourcemanager.SourceManager(tempdir, DummyApp()) - t = s.get_treeish(os.getcwd(),'master') + t = s.get_treeish(os.getcwd(), 'master') assert(t.ref == 'refs/heads/master') shutil.rmtree(tempdir) @@ -76,7 +75,8 @@ class SourceManagerTests(unittest.TestCase): bundle_server_loc = tempdir+'/bundle_server' os.mkdir(bundle_server_loc) bundle_name = morphlib.sourcemanager.quote_url(os.getcwd()) + '.bndl' - shutil.copy(os.getcwd() +'/testdata/morph.bndl', bundle_server_loc + '/' +bundle_name) + shutil.copy(os.getcwd() +'/testdata/morph.bndl', + bundle_server_loc + '/' +bundle_name) app = DummyApp() app.settings['bundle-server'] = 'file://' + bundle_server_loc @@ -89,7 +89,8 @@ class SourceManagerTests(unittest.TestCase): s._wget = wget - t = s.get_treeish(os.getcwd(),'41ee528492db9bd41604311b100da5a871098b3a') + t = s.get_treeish(os.getcwd(), + '41ee528492db9bd41604311b100da5a871098b3a') assert(t.sha1 == '41ee528492db9bd41604311b100da5a871098b3a') shutil.rmtree(tempdir) @@ -107,7 +108,8 @@ class SourceManagerTests(unittest.TestCase): shutil.copy(path, s.source_cache_dir) s._wget = wget - self.assertRaises(morphlib.sourcemanager.SourceNotFound, s.get_treeish, 'asdf','41ee528492db9bd41604311b100da5a871098b3a') + self.assertRaises(morphlib.sourcemanager.SourceNotFound, s.get_treeish, + 'asdf','41ee528492db9bd41604311b100da5a871098b3a') shutil.rmtree(tempdir) @@ -119,7 +121,8 @@ class SourceManagerTests(unittest.TestCase): s = morphlib.sourcemanager.SourceManager(tempdir, app) - t = s.get_treeish(os.getcwd(),'41ee528492db9bd41604311b100da5a871098b3a') + t = s.get_treeish(os.getcwd(), + '41ee528492db9bd41604311b100da5a871098b3a') assert(t.sha1 == '41ee528492db9bd41604311b100da5a871098b3a') shutil.rmtree(tempdir) diff --git a/tests/missing-ref.stderr b/tests/missing-ref.stderr index cd72eec2..a184134b 100644 --- a/tests/missing-ref.stderr +++ b/tests/missing-ref.stderr @@ -1 +1 @@ -ERROR: non-existent-branch is an invalid reference for repo /chunk-repo +ERROR: non-existent-branch is an invalid reference for repo /chunk-repo/ |