better svn test coverage

This commit is contained in:
Alan Hamlett 2015-09-26 21:11:21 -07:00
parent ddb01ee894
commit 0a56ffa8eb
3 changed files with 5 additions and 5 deletions

View file

@ -101,7 +101,7 @@ class LanguagesTestCase(utils.TestCase):
mock_popen.return_value = (stdout, stderr) mock_popen.return_value = (stdout, stderr)
now = u(int(time.time())) now = u(int(time.time()))
entity = 'tests/samples/projects/svn/emptyfile.txt' entity = 'tests/samples/projects/svn/afolder/emptyfile.txt'
config = 'tests/samples/configs/sample.cfg' config = 'tests/samples/configs/sample.cfg'
args = ['--file', entity, '--config', config, '--time', now] args = ['--file', entity, '--config', config, '--time', now]
@ -125,7 +125,7 @@ class LanguagesTestCase(utils.TestCase):
mock_communicate.side_effect = OSError('') mock_communicate.side_effect = OSError('')
now = u(int(time.time())) now = u(int(time.time()))
entity = 'tests/samples/projects/svn/emptyfile.txt' entity = 'tests/samples/projects/svn/afolder/emptyfile.txt'
config = 'tests/samples/configs/sample.cfg' config = 'tests/samples/configs/sample.cfg'
args = ['--file', entity, '--config', config, '--time', now] args = ['--file', entity, '--config', config, '--time', now]

View file

@ -18,7 +18,7 @@ from .base import BaseProject
from ..compat import u, open from ..compat import u, open
try: try:
from collections import OrderedDict from collections import OrderedDict
except ImportError: except ImportError: # pragma: nocover
from ..packages.ordereddict import OrderedDict # pragma: nocover from ..packages.ordereddict import OrderedDict # pragma: nocover
@ -33,12 +33,12 @@ class Subversion(BaseProject):
def name(self): def name(self):
if 'Repository Root' not in self.info: if 'Repository Root' not in self.info:
return None return None # pragma: nocover
return u(self.info['Repository Root'].split('/')[-1].split('\\')[-1]) return u(self.info['Repository Root'].split('/')[-1].split('\\')[-1])
def branch(self): def branch(self):
if 'URL' not in self.info: if 'URL' not in self.info:
return None return None # pragma: nocover
return u(self.info['URL'].split('/')[-1].split('\\')[-1]) return u(self.info['URL'].split('/')[-1].split('\\')[-1])
def _find_binary(self): def _find_binary(self):