aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron Bentley <aaron.bentley@utoronto.ca>2005-03-24 13:05:44 +0000
committerAaron Bentley <aaron.bentley@utoronto.ca>2005-03-24 13:05:44 +0000
commite150af60e2331fbacbd2de1bcfd572b7cf73c802 (patch)
treea3c320ffa77ccfcef212c11bf860bf77f03716aa
parent7bbb8105c144eaca2299bd22b4063af6b54ef1a3 (diff)
downloadbugseverywhere-e150af60e2331fbacbd2de1bcfd572b7cf73c802.tar.gz
Finished tests for new
-rw-r--r--.be/bugs/7ba4bc51-b251-483a-a67a-f1b89c83f6af/comments/ec16300f-529a-4492-8327-f9a72e4447c2/body4
-rw-r--r--.be/bugs/7ba4bc51-b251-483a-a67a-f1b89c83f6af/comments/ec16300f-529a-4492-8327-f9a72e4447c2/values14
-rw-r--r--.be/bugs/a/values35
-rw-r--r--becommands/new.py15
4 files changed, 66 insertions, 2 deletions
diff --git a/.be/bugs/7ba4bc51-b251-483a-a67a-f1b89c83f6af/comments/ec16300f-529a-4492-8327-f9a72e4447c2/body b/.be/bugs/7ba4bc51-b251-483a-a67a-f1b89c83f6af/comments/ec16300f-529a-4492-8327-f9a72e4447c2/body
new file mode 100644
index 0000000..e0b86a5
--- /dev/null
+++ b/.be/bugs/7ba4bc51-b251-483a-a67a-f1b89c83f6af/comments/ec16300f-529a-4492-8327-f9a72e4447c2/body
@@ -0,0 +1,4 @@
+We've got coverage of set_root and new. This leaves
+close, comment, list, open, severity, show, target, upgrade
+
+It's quite nice, though, that doctest captures stdout.
diff --git a/.be/bugs/7ba4bc51-b251-483a-a67a-f1b89c83f6af/comments/ec16300f-529a-4492-8327-f9a72e4447c2/values b/.be/bugs/7ba4bc51-b251-483a-a67a-f1b89c83f6af/comments/ec16300f-529a-4492-8327-f9a72e4447c2/values
new file mode 100644
index 0000000..ae4c276
--- /dev/null
+++ b/.be/bugs/7ba4bc51-b251-483a-a67a-f1b89c83f6af/comments/ec16300f-529a-4492-8327-f9a72e4447c2/values
@@ -0,0 +1,14 @@
+
+
+
+Date=Thu, 24 Mar 2005 13:05:13 +0000
+
+
+
+
+
+
+From=abentley
+
+
+
diff --git a/.be/bugs/a/values b/.be/bugs/a/values
new file mode 100644
index 0000000..6a649ce
--- /dev/null
+++ b/.be/bugs/a/values
@@ -0,0 +1,35 @@
+
+
+
+creator=abentley
+
+
+
+
+
+
+severity=minor
+
+
+
+
+
+
+status=open
+
+
+
+
+
+
+summary=this is a test
+
+
+
+
+
+
+time=Thu, 24 Mar 2005 12:56:23 +0000
+
+
+
diff --git a/becommands/new.py b/becommands/new.py
index 01acf96..47221a7 100644
--- a/becommands/new.py
+++ b/becommands/new.py
@@ -1,13 +1,24 @@
"""Create a new bug"""
-from libbe import bugdir, cmdutil, names, utility, tests
+from libbe import bugdir, cmdutil, names, utility
def execute(args):
"""
- >>> import os
+ >>> import os, time
+ >>> from libbe import tests
>>> dir = tests.bug_arch_dir()
>>> os.chdir(dir.dir)
>>> names.uuid = lambda: "a"
>>> execute (("this is a test",))
Created bug with ID a
+ >>> bug = list(dir.list())[0]
+ >>> bug.summary
+ 'this is a test'
+ >>> bug.creator = os.environ["LOGNAME"]
+ >>> bug.time <= int(time.time())
+ True
+ >>> bug.severity
+ 'minor'
+ >>> bug.target == None
+ True
>>> tests.clean_up()
"""
if len(args) != 1: