From: "Michał Górny" <mgorny@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/gentoopm:master commit in: /, gentoopm/tests/
Date: Fri, 15 Jul 2011 09:52:26 +0000 (UTC) [thread overview]
Message-ID: <5af231d34b76a38848b95fb7d7212246996edf7b.mgorny@gentoo> (raw)
commit: 5af231d34b76a38848b95fb7d7212246996edf7b
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Fri Jul 15 08:54:39 2011 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Fri Jul 15 08:54:39 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/gentoopm.git;a=commit;h=5af231d3
Add tests for config.
---
gentoopm/tests/config.py | 19 +++++++++++++++++++
setup.py | 1 +
2 files changed, 20 insertions(+), 0 deletions(-)
diff --git a/gentoopm/tests/config.py b/gentoopm/tests/config.py
new file mode 100644
index 0000000..599e06d
--- /dev/null
+++ b/gentoopm/tests/config.py
@@ -0,0 +1,19 @@
+#!/usr/bin/python
+# vim:fileencoding=utf-8
+# (c) 2011 Michał Górny <mgorny@gentoo.org>
+# Released under the terms of the 2-clause BSD license.
+
+from gentoopm.tests import PMTestCase
+
+class ConfigTestCase(PMTestCase):
+ def setUp(self):
+ self._conf = self.pm.config
+
+ def test_userpriv(self):
+ if self._conf.userpriv_enabled:
+ # root's no userpriv
+ self.assertNotEqual(self._conf.userpriv_uid, 0)
+ self.assertNotEqual(self._conf.userpriv_gid, 0)
+
+ def tearDown(self):
+ pass
diff --git a/setup.py b/setup.py
index 92fc300..5eac8d5 100755
--- a/setup.py
+++ b/setup.py
@@ -54,6 +54,7 @@ class TestCommand(Command):
testsuite = unittest.TestSuite()
testsuite.addTests(l.loadTestsFromModule('gentoopm.tests.atom'))
+ testsuite.addTests(l.loadTestsFromModule('gentoopm.tests.config'))
maintestsuite.addTests(testsuite)
r = unittest.TextTestRunner()
next reply other threads:[~2011-07-15 9:53 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-15 9:52 Michał Górny [this message]
-- strict thread matches above, loose matches on Subject: below --
2011-07-15 12:34 [gentoo-commits] proj/gentoopm:master commit in: /, gentoopm/tests/ Michał Górny
2011-07-15 12:34 Michał Górny
2011-07-15 9:52 Michał Górny
2011-07-15 9:52 Michał Górny
2011-07-14 22:51 Michał Górny
2011-07-14 22:51 Michał Górny
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5af231d34b76a38848b95fb7d7212246996edf7b.mgorny@gentoo \
--to=mgorny@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox