aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2017-08-02 01:32:37 -0300
committerGuido Günther <agx@sigxcpu.org>2017-08-02 10:35:05 -0300
commitfe94ea82051aef0808797ab832485670eb769903 (patch)
treed2eb3cdd419b9a64fff122367141828ce8c50ded
parent3c47611c44cb8645f03c29eca1d26b8b11d0b6e1 (diff)
Python3: Fix doctest exception names
Python3 prefixes the module names
-rw-r--r--gbp/command_wrappers.py4
-rw-r--r--gbp/config.py2
-rw-r--r--gbp/deb/format.py2
-rw-r--r--gbp/deb/uscan.py8
-rw-r--r--gbp/format.py4
-rw-r--r--gbp/scripts/import_orig.py6
6 files changed, 13 insertions, 13 deletions
diff --git a/gbp/command_wrappers.py b/gbp/command_wrappers.py
index f101d231..e950c6ec 100644
--- a/gbp/command_wrappers.py
+++ b/gbp/command_wrappers.py
@@ -179,7 +179,7 @@ class Command(object):
>>> Command("/foo/bar")(quiet=True)
Traceback (most recent call last):
...
- CommandExecFailed: '/foo/bar' failed: execution failed: [Errno 2] No such file or directory
+ gbp.command_wrappers.CommandExecFailed: '/foo/bar' failed: execution failed: [Errno 2] No such file or directory: '/foo/bar'
"""
try:
ret = self.__call(args)
@@ -212,7 +212,7 @@ class Command(object):
>>> Command("/foo/bar").call(["foo", "bar"]) # doctest:+ELLIPSIS
Traceback (most recent call last):
...
- CommandExecFailed: execution failed: ...
+ gbp.command_wrappers.CommandExecFailed: execution failed: ...
>>> c = Command("/bin/true", capture_stdout=True,
... extra_env={'LC_ALL': 'C'})
>>> c.call(["--version"])
diff --git a/gbp/config.py b/gbp/config.py
index 07b882ca..1df19aec 100644
--- a/gbp/config.py
+++ b/gbp/config.py
@@ -458,7 +458,7 @@ class GbpOptionParser(OptionParser):
>>> GbpOptionParser._listify('[')
Traceback (most recent call last):
...
- Error: [ is not a proper list
+ configparser.Error: [ is not a proper list
"""
# filter can be either a list or a string, always build a list:
if value:
diff --git a/gbp/deb/format.py b/gbp/deb/format.py
index 2717d4bb..23339b45 100644
--- a/gbp/deb/format.py
+++ b/gbp/deb/format.py
@@ -40,7 +40,7 @@ class DebianSourceFormat(object):
>>> d = DebianSourceFormat("1.0 broken")
Traceback (most recent call last):
...
- DebianSourceFormatError: Cannot get source format from '1.0 broken'
+ gbp.deb.format.DebianSourceFormatError: Cannot get source format from '1.0 broken'
"""
format_file = 'debian/source/format'
diff --git a/gbp/deb/uscan.py b/gbp/deb/uscan.py
index 4613b960..fcb9319d 100644
--- a/gbp/deb/uscan.py
+++ b/gbp/deb/uscan.py
@@ -57,7 +57,7 @@ class Uscan(object):
>>> u._parse('')
Traceback (most recent call last):
...
- UscanError: Couldn't find 'upstream-url' in uscan output
+ gbp.deb.uscan.UscanError: Couldn't find 'upstream-url' in uscan output
"""
source = None
self._uptodate = False
@@ -146,17 +146,17 @@ class Uscan(object):
... "to example.com:80 (Bad hostname)</warnings>")
Traceback (most recent call last):
...
- UscanError: Uscan failed: uscan warning: In watchfile debian/watch, reading webpage
+ gbp.deb.uscan.UscanError: Uscan failed: uscan warning: In watchfile debian/watch, reading webpage
http://a.b/ failed: 500 Cant connect to example.com:80 (Bad hostname)
>>> u._raise_error("<errors>uscan: Can't use --verbose if "
... "you're using --dehs!</errors>")
Traceback (most recent call last):
...
- UscanError: Uscan failed: uscan: Can't use --verbose if you're using --dehs!
+ gbp.deb.uscan.UscanError: Uscan failed: uscan: Can't use --verbose if you're using --dehs!
>>> u = u._raise_error('')
Traceback (most recent call last):
...
- UscanError: Uscan failed - debug by running 'uscan --verbose'
+ gbp.deb.uscan.UscanError: Uscan failed - debug by running 'uscan --verbose'
"""
msg = None
diff --git a/gbp/format.py b/gbp/format.py
index d1985195..2edf4ebd 100644
--- a/gbp/format.py
+++ b/gbp/format.py
@@ -27,11 +27,11 @@ def format_str(msg, args):
>>> format_str("%(foo)", {})
Traceback (most recent call last):
...
- GbpError: Failed to format %(foo): Missing value 'foo' in {}
+ gbp.errors.GbpError: Failed to format %(foo): Missing value 'foo' in {}
>>> format_str("%(foo)", {'foo': 'bar'})
Traceback (most recent call last):
...
- GbpError: Failed to format %(foo) with {'foo': 'bar'}: incomplete format
+ gbp.errors.GbpError: Failed to format %(foo) with {'foo': 'bar'}: incomplete format
>>> format_str("A %(foo)s is a %(bar)s", {'foo': 'dog', 'bar': 'mamal'})
'A dog is a mamal'
"""
diff --git a/gbp/scripts/import_orig.py b/gbp/scripts/import_orig.py
index 016ebff9..d3feef5f 100644
--- a/gbp/scripts/import_orig.py
+++ b/gbp/scripts/import_orig.py
@@ -273,15 +273,15 @@ def find_source(use_uscan, args):
>>> find_source(False, ['too', 'many'])
Traceback (most recent call last):
...
- GbpError: More than one archive specified. Try --help.
+ gbp.errors.GbpError: More than one archive specified. Try --help.
>>> find_source(False, [])
Traceback (most recent call last):
...
- GbpError: No archive to import specified. Try --help.
+ gbp.errors.GbpError: No archive to import specified. Try --help.
>>> find_source(True, ['tarball'])
Traceback (most recent call last):
...
- GbpError: you can't pass both --uscan and a filename.
+ gbp.errors.GbpError: you can't pass both --uscan and a filename.
>>> find_source(False, ['tarball']).path
'tarball'
"""