aboutsummaryrefslogtreecommitdiffstats
path: root/libbe/bug.py
diff options
context:
space:
mode:
authorW. Trevor King <wking@drexel.edu>2010-02-06 13:09:24 -0500
committerW. Trevor King <wking@drexel.edu>2010-02-06 13:09:24 -0500
commit668be5b01d9ad47f4f9714bfe8deee377341eb35 (patch)
tree367f0df6c880bc1a6815d1d290cb30f9a3352660 /libbe/bug.py
parent23b523c3ddd527012f0ae18dc2b3da2fadcfdae2 (diff)
downloadbugseverywhere-668be5b01d9ad47f4f9714bfe8deee377341eb35.tar.gz
Added libbe.bug to the Sphinx documentation
Diffstat (limited to 'libbe/bug.py')
-rw-r--r--libbe/bug.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/libbe/bug.py b/libbe/bug.py
index 0b40921..a4b569f 100644
--- a/libbe/bug.py
+++ b/libbe/bug.py
@@ -16,8 +16,7 @@
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-"""
-Define the Bug class for representing bugs.
+"""Define the Bug class for representing bugs.
"""
import copy
@@ -122,7 +121,9 @@ load_status(active_status_def, inactive_status_def)
class Bug (settings_object.SavedSettingsObject):
- """
+ """A bug (or issue) is a place to store attributes and attach
+ comments. In mailing-list terms, a bug is analogous to a thread.
+
>>> b = Bug()
>>> print b.status
open
@@ -132,6 +133,7 @@ class Bug (settings_object.SavedSettingsObject):
There are two formats for time, int and string. Setting either
one will adjust the other appropriately. The string form is the
one stored in the bug's settings file on disk.
+
>>> print type(b.time)
<type 'int'>
>>> print type(b.time_string)
@@ -333,7 +335,7 @@ class Bug (settings_object.SavedSettingsObject):
return istring + sep.join(lines).rstrip('\n')
def from_xml(self, xml_string, verbose=True):
- """
+ u"""
Note: If a bug uuid is given, set .alt_id to it's value.
>>> bugA = Bug(uuid="0123", summary="Need to test Bug.from_xml()")
>>> bugA.date = "Thu, 01 Jan 1970 00:00:00 +0000"
@@ -410,6 +412,7 @@ class Bug (settings_object.SavedSettingsObject):
Add a comment too the current bug, under the parent specified
by comment.in_reply_to.
Note: If a bug uuid is given, set .alt_id to it's value.
+
>>> bugA = Bug(uuid='0123', summary='Need to test Bug.add_comment()')
>>> bugA.creator = 'Jack'
>>> commA = bugA.comment_root.new_reply(body='comment A')
@@ -506,6 +509,7 @@ class Bug (settings_object.SavedSettingsObject):
"""
Merge info from other into this bug. Overrides any attributes
in self that are listed in other.explicit_attrs.
+
>>> bugA = Bug(uuid='0123', summary='Need to test Bug.merge()')
>>> bugA.date = 'Thu, 01 Jan 1970 00:00:00 +0000'
>>> bugA.creator = 'Frank'