diff options
author | Guido Günther <agx@sigxcpu.org> | 2013-06-15 13:06:00 +0200 |
---|---|---|
committer | Guido Günther <agx@sigxcpu.org> | 2014-06-26 20:04:05 +0200 |
commit | d8e234820a23d94ec5f1c67541d97896fd94af2f (patch) | |
tree | 2f1dd13b8af9e7d085459492110876312cc15e20 /tests |
Initial commit
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_pom.py | 42 |
1 files changed, 42 insertions, 0 deletions
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 <agx@sigxcpu.org> +# 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 <http://www.gnu.org/licenses/>. +"""Test L{pomop.pom} config""" + +import unittest + +from pomop.pom import Pom + +pom_xml = """<?xml version="1.0" encoding="UTF-8"?> +<project xmlns="http://maven.apache.org/POM/4.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <groupId>org.sigxcpu.pomop</groupId> + <artifactId>pomop-parent</artifactId> + <packaging>pom</packaging> + <version>2.7 </version> +</project>""" + + +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) |