[Reportbug-commits] [SCM] Reportbug - reports bugs in the Debian distribution branch, master, updated. 4.9-199-g136241e
Sandro Tosi
morph at debian.org
Sat Jul 30 19:59:40 UTC 2011
The following commit has been merged in the master branch:
commit 136241e6a9fa672da736bc7c401d5d9e7947ae03
Author: Sandro Tosi <morph at debian.org>
Date: Sat Jul 30 21:27:45 2011 +0200
Merge checks/ dir into the tests suite (check for pseudo-packages list sync)
diff --git a/Makefile b/Makefile
index 12b59ee..e8a4656 100644
--- a/Makefile
+++ b/Makefile
@@ -3,10 +3,6 @@
NOSETESTS = nosetests test -v --stop
nosetests_cmd = $(NOSETESTS) ${NOSETESTS_OPTS}
-.PHONY: checks
-checks:
- PYTHONPATH=. $(PYTHON) checks/compare_pseudo-pkgs_lists.py
-
.PHONY: tests
tests:
$(nosetests_cmd)
diff --git a/checks/compare_pseudo-pkgs_lists.py b/checks/compare_pseudo-pkgs_lists.py
deleted file mode 100644
index 7c63b20..0000000
--- a/checks/compare_pseudo-pkgs_lists.py
+++ /dev/null
@@ -1,39 +0,0 @@
-# Author: Sandro Tosi <morph at debian.org>
-# Date: 2008-05-16
-# License: Public domain
-#
-# Python script to compare pseudo-packages listed in reportbug
-# agaists the official list on bugs.debian.org
-
-import sys, os
-sys.path = ['.'] + sys.path
-
-from reportbug import utils
-from reportbug import debianbts
-
-import urllib, re
-
-# separete a sequence of "char not spaces", from at least one space (canonical copy uses tabs), from anything after tabs
-# we group the first and the latter, so we get the pseudo-packages name and description
-dictparse = re.compile(r'([^\s]+)\s+(.+)',re.IGNORECASE)
-
-bdo_list = {}
-pseudo = urllib.urlopen('http://bugs.debian.org/pseudopackages/pseudo-packages.description')
-for l in pseudo:
- m = dictparse.search(l)
- bdo_list[m.group(1)] = m.group(2)
-
-bts_keys=debianbts.debother.keys();
-
-diff_rb_bdo = set(bts_keys)-set(bdo_list)
-diff_bdo_rb = set(bdo_list)-set(bts_keys)
-
-print "pseudo-pkgs in reportbug not in bugs.debian.org list:", diff_rb_bdo
-
-for pkg in diff_rb_bdo:
- print " ", pkg,": ", debianbts.debother[pkg]
-
-print "pseudo-pkgs in bugs.debian.org list not in reportbug:", diff_bdo_rb
-
-for pkg in diff_bdo_rb:
- print " ", pkg,": ", bdo_list[pkg]
diff --git a/test/test_debianbts.py b/test/test_debianbts.py
index 3910e25..ffcb2e0 100644
--- a/test/test_debianbts.py
+++ b/test/test_debianbts.py
@@ -5,6 +5,9 @@ from nose.plugins.attrib import attr
from reportbug import utils
from reportbug import debianbts
+import urllib
+import re
+
class TestDebianbts(unittest2.TestCase):
def test_get_tags(self):
@@ -89,6 +92,21 @@ class TestMiscFunctions(unittest2.TestCase):
for type, severity, value in sevs:
self.assertEqual(debianbts.convert_severity(severity, type), value)
+ @attr('network') #marking the test as using network
+ @unittest2.skip("Need to talk with dondelelcaro about make them sync")
+ def test_pseudopackages_in_sync(self):
+
+ dictparse = re.compile(r'([^\s]+)\s+(.+)',re.IGNORECASE)
+
+ bdo_list = {}
+ pseudo = urllib.urlopen('http://bugs.debian.org/pseudopackages/pseudo-packages.description')
+ for l in pseudo:
+ m = dictparse.search(l)
+ bdo_list[m.group(1)] = m.group(2)
+
+ self.maxDiff = None
+ self.assertEqual(debianbts.debother, bdo_list)
+
class TestGetReports(unittest2.TestCase):
--
Reportbug - reports bugs in the Debian distribution
More information about the Reportbug-commits
mailing list