Improved logging for test_rsync_url
Change-Id: I29f8b1cee5a0b4bc8f3ce5d69669880ddd46c4a4
diff --git a/test_rsync_url.py b/test_rsync_url.py
index 74e05ce..170f714 100644
--- a/test_rsync_url.py
+++ b/test_rsync_url.py
@@ -14,26 +14,27 @@
def log_locals(self, url):
if url.match:
- logger.info('RE: "{}"'.format(url.match.pattern))
+ logger.info('Type: {}, RE: "{}"'
+ ''.format(url.url_type, url.match.pattern))
logger.info('user "{}", host "{}", port "{}", module "{}", '
'path "{}"'.format(url.user, url.host, url.port,
url.module, url.path))
def exact_match_num(self, remote, expected_result):
- logger.info('"{}" - {}'.format(remote, expected_result))
+ logger.info('For "{}" should be {}'.format(remote, expected_result))
url = rsync_url.RsyncUrl(remote)
self.log_locals(url)
matching_regexps = url._get_all_matching_regexps()
self.assertEqual(len(matching_regexps), expected_result)
def classed(self, remote, expected_result):
- logger.info('"{}" - {}'.format(remote, expected_result))
+ logger.info('For "{}" should be {}'.format(remote, expected_result))
url = rsync_url.RsyncUrl(remote)
self.log_locals(url)
self.assertEqual(url.url_type, expected_result)
def parsed(self, remote, expected_result):
- logger.info('"{}" - {}'.format(remote, expected_result))
+ logger.info('For "{}" should be {}'.format(remote, expected_result))
url = rsync_url.RsyncUrl(remote)
self.log_locals(url)
self.assertEqual(
@@ -42,7 +43,7 @@
)
def parsed_rsync(self, remote, expected_result):
- logger.info('"{}" - {}'.format(remote, expected_result))
+ logger.info('For "{}" should be {}'.format(remote, expected_result))
url = rsync_url.RsyncUrl(remote)
self.log_locals(url)
self.assertEqual(
@@ -51,19 +52,19 @@
)
def valid(self, remote, expected_result):
- logger.info('"{}" - {}'.format(remote, expected_result))
+ logger.info('For "{}" should be {}'.format(remote, expected_result))
url = rsync_url.RsyncUrl(remote)
self.log_locals(url)
self.assertEqual(url.is_valid, expected_result)
def url(self, remote, expected_result):
- logger.info('"{}" - {}'.format(remote, expected_result))
+ logger.info('For "{}" should be {}'.format(remote, expected_result))
url = rsync_url.RsyncUrl(remote)
self.log_locals(url)
self.assertEqual(url.url, expected_result)
def urljoin(self, remote, expected_result):
- logger.info('"{}" - {}'.format(remote, expected_result))
+ logger.info('For "{}" should be {}'.format(remote, expected_result))
url = rsync_url.RsyncUrl(remote)
self.log_locals(url)
for par, er in expected_result.items():
@@ -71,7 +72,7 @@
self.assertEqual(url.urljoin(par), er)
def dirname(self, remote, expected_result):
- logger.info('"{}" - {}'.format(remote, expected_result))
+ logger.info('For "{}" should be {}'.format(remote, expected_result))
url = rsync_url.RsyncUrl(remote)
self.log_locals(url)
for par, er in expected_result.items():
@@ -79,7 +80,7 @@
self.assertEqual(url.dirname(par), er)
def url_in(self, remote, expected_result):
- logger.info('"{}" - {}'.format(remote, expected_result))
+ logger.info('For "{}" should be {}'.format(remote, expected_result))
url = rsync_url.RsyncUrl(remote)
self.log_locals(url)
for par, er in expected_result.items():
@@ -87,7 +88,7 @@
self.assertEqual(url.url_in(par), er)
def filename(self, remote, expected_result):
- logger.info('"{}" - {}'.format(remote, expected_result))
+ logger.info('For "{}" should be {}'.format(remote, expected_result))
url = rsync_url.RsyncUrl(remote)
self.log_locals(url)
for par, er in expected_result.items():
@@ -95,7 +96,7 @@
self.assertEqual(url.filename(par), er)
def url_is(self, remote, expected_result):
- logger.info('"{}" - {}'.format(remote, expected_result))
+ logger.info('For "{}" should be {}'.format(remote, expected_result))
url = rsync_url.RsyncUrl(remote)
self.log_locals(url)
for par, er in expected_result.items():