From d8e234820a23d94ec5f1c67541d97896fd94af2f Mon Sep 17 00:00:00 2001 From: Guido Günther Date: Sat, 15 Jun 2013 13:06:00 +0200 Subject: Initial commit --- tests/test_pom.py | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 tests/test_pom.py (limited to 'tests') diff --git a/tests/test_pom.py b/tests/test_pom.py new file mode 100644 index 0000000..269014e --- /dev/null +++ b/tests/test_pom.py @@ -0,0 +1,42 @@ +# vim: set fileencoding=utf-8 : +# (C) 2013 Guido Günther +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +"""Test L{pomop.pom} config""" + +import unittest + +from pomop.pom import Pom + +pom_xml = """ + + 4.0.0 + + org.sigxcpu.pomop + pomop-parent + pom + 2.7 +""" + + +class TestPom(unittest.TestCase): + def test_parse(self): + """Parse simplistic pom and check values""" + p = Pom.parse(pom_xml) + self.assertIsNotNone(p) + self.assertEqual(p.full_triplet[0], 'org.sigxcpu.pomop') + self.assertEqual(p.full_triplet[1], 'pomop-parent') + self.assertEqual(p.full_triplet[2], '2.7') + self.assertEqual(p.get_parent(), None) -- cgit v1.2.3