aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorRafael G. Martins <rafael@rafaelmartins.eng.br>2010-12-10 15:00:27 -0200
committerRafael G. Martins <rafael@rafaelmartins.eng.br>2010-12-10 15:00:27 -0200
commit9d868538bcd82d8161a53c8b26e5b5e662fda77e (patch)
treea92e88552b7f524e5ffa43e0e0278be06593c745 /tests
parentsmall fixes (diff)
downloadg-octave-9d868538bcd82d8161a53c8b26e5b5e662fda77e.tar.gz
g-octave-9d868538bcd82d8161a53c8b26e5b5e662fda77e.tar.bz2
g-octave-9d868538bcd82d8161a53c8b26e5b5e662fda77e.zip
added P/PN/PV to the description object. some tests are broken.
Diffstat (limited to 'tests')
-rw-r--r--tests/files/pkg-0.0.1.DESCRIPTION (renamed from tests/files/DESCRIPTION)0
-rw-r--r--tests/test_description.py16
2 files changed, 8 insertions, 8 deletions
diff --git a/tests/files/DESCRIPTION b/tests/files/pkg-0.0.1.DESCRIPTION
index d02ceea..d02ceea 100644
--- a/tests/files/DESCRIPTION
+++ b/tests/files/pkg-0.0.1.DESCRIPTION
diff --git a/tests/test_description.py b/tests/test_description.py
index e6044ff..3688dd1 100644
--- a/tests/test_description.py
+++ b/tests/test_description.py
@@ -23,7 +23,7 @@ class TestDescription(testcase.TestCase):
testcase.TestCase.setUp(self)
self.desc = description.Description(
os.path.join(
- os.path.dirname(os.path.abspath(__file__)), 'files', 'DESCRIPTION',
+ os.path.dirname(os.path.abspath(__file__)), 'files', 'pkg-0.0.1.DESCRIPTION',
),
)
@@ -160,16 +160,13 @@ class TestDescription(testcase.TestCase):
def test_re_pkg_atom(self):
depends = [
- ('pkg-1', ('pkg', '1')),
- ('pkg-1.0', ('pkg', '1.0')),
- ('pkg-1.0.0', ('pkg', '1.0.0')),
+ ('pkg-1.DESCRIPTION', ('pkg-1', 'pkg', '1')),
+ ('pkg-1.0.DESCRIPTION', ('pkg-1.0', 'pkg', '1.0')),
+ ('pkg-1.0.0.DESCRIPTION', ('pkg-1.0.0', 'pkg', '1.0.0')),
]
for pkgstr, pkgtpl in depends:
match = description.re_pkg_atom.match(pkgstr)
- self.assertEqual(
- (match.group(1), match.group(2)),
- pkgtpl
- )
+ self.assertEqual((match.group(1), match.group(2), match.group(3)), pkgtpl)
def test_attributes(self):
# TODO: split this method to improve the error reporting
@@ -183,6 +180,9 @@ class TestDescription(testcase.TestCase):
self.assertEqual(self.desc.description, 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.')
self.assertEqual(self.desc.categories, 'Category1,Category2, Category3')
self.assertEqual(self.desc.url, 'http://example.org')
+ self.assertEqual(self.desc.P, 'pkg-0.0.1')
+ self.assertEqual(self.desc.PN, 'pkg')
+ self.assertEqual(self.desc.PV, '0.0.1')
requirements = [
'<g-octave/pkg12-1.2.3',