summaryrefslogtreecommitdiff
path: root/fastimport/tests/test_errors.py
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@jelmer.uk>2021-09-18 16:55:06 +0100
committerJelmer Vernooij <jelmer@jelmer.uk>2021-09-18 16:55:06 +0100
commit90cc92891309e192f6c6ba2665badac12619a1ed (patch)
treec6e3e5720f914749799946f40bca3a39b0729f02 /fastimport/tests/test_errors.py
parent088bc0459e50bbcb948f3317772825859347b014 (diff)
parent6ed4b196e21974c6bac4323522cd086794618068 (diff)
downloadpython-fastimport-git-upstream.tar.gz
Import upstream version 0.9.14upstream/0.9.14upstream
Diffstat (limited to 'fastimport/tests/test_errors.py')
-rw-r--r--fastimport/tests/test_errors.py27
1 files changed, 15 insertions, 12 deletions
diff --git a/fastimport/tests/test_errors.py b/fastimport/tests/test_errors.py
index 4fc7dcd..895f783 100644
--- a/fastimport/tests/test_errors.py
+++ b/fastimport/tests/test_errors.py
@@ -25,27 +25,28 @@ class TestErrors(TestCase):
def test_MissingBytes(self):
e = errors.MissingBytes(99, 10, 8)
- self.assertEqual("line 99: Unexpected EOF - expected 10 bytes, found 8",
+ self.assertEqual(
+ "line 99: Unexpected EOF - expected 10 bytes, found 8",
str(e))
def test_MissingTerminator(self):
e = errors.MissingTerminator(99, '---')
- self.assertEqual("line 99: Unexpected EOF - expected '---' terminator",
+ self.assertEqual(
+ "line 99: Unexpected EOF - expected '---' terminator",
str(e))
def test_InvalidCommand(self):
e = errors.InvalidCommand(99, 'foo')
- self.assertEqual("line 99: Invalid command 'foo'",
- str(e))
+ self.assertEqual("line 99: Invalid command 'foo'", str(e))
def test_MissingSection(self):
e = errors.MissingSection(99, 'foo', 'bar')
- self.assertEqual("line 99: Command foo is missing section bar",
- str(e))
+ self.assertEqual("line 99: Command foo is missing section bar", str(e))
def test_BadFormat(self):
e = errors.BadFormat(99, 'foo', 'bar', 'xyz')
- self.assertEqual("line 99: Bad format for section bar in "
+ self.assertEqual(
+ "line 99: Bad format for section bar in "
"command foo: found 'xyz'",
str(e))
@@ -53,14 +54,15 @@ class TestErrors(TestCase):
e = errors.InvalidTimezone(99, 'aa:bb')
self.assertEqual('aa:bb', e.timezone)
self.assertEqual('', e.reason)
- self.assertEqual("line 99: Timezone 'aa:bb' could not be converted.",
+ self.assertEqual(
+ "line 99: Timezone 'aa:bb' could not be converted.",
str(e))
e = errors.InvalidTimezone(99, 'aa:bb', 'Non-numeric hours')
self.assertEqual('aa:bb', e.timezone)
self.assertEqual(' Non-numeric hours', e.reason)
- self.assertEqual("line 99: Timezone 'aa:bb' could not be converted."
- " Non-numeric hours",
- str(e))
+ self.assertEqual(
+ "line 99: Timezone 'aa:bb' could not be converted."
+ " Non-numeric hours", str(e))
def test_UnknownDateFormat(self):
e = errors.UnknownDateFormat('aaa')
@@ -72,5 +74,6 @@ class TestErrors(TestCase):
def test_UnknownFeature(self):
e = errors.UnknownFeature('aaa')
- self.assertEqual("Unknown feature 'aaa' - try a later importer or "
+ self.assertEqual(
+ "Unknown feature 'aaa' - try a later importer or "
"an earlier data format", str(e))