public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Michał Górny" <mgorny@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/gentoopm:master commit in: gentoopm/tests/
Date: Sat, 29 Nov 2014 08:57:05 +0000 (UTC)	[thread overview]
Message-ID: <1417251369.a1ff52849d993e56be281a45d4b6f104799a5b12.mgorny@gentoo> (raw)

commit:     a1ff52849d993e56be281a45d4b6f104799a5b12
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sat Nov 29 08:56:09 2014 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sat Nov 29 08:56:09 2014 +0000
URL:        http://sources.gentoo.org/gitweb/?p=proj/gentoopm.git;a=commit;h=a1ff5284

Unroll loops in tests for cleaner output

---
 gentoopm/tests/atom.py | 16 +++++++++++-----
 1 file changed, 11 insertions(+), 5 deletions(-)

diff --git a/gentoopm/tests/atom.py b/gentoopm/tests/atom.py
index c166d4d..74d1b28 100644
--- a/gentoopm/tests/atom.py
+++ b/gentoopm/tests/atom.py
@@ -14,8 +14,9 @@ class UserSpecifiedAtomTestCase(PMTestCase):
 		self._associated_atom = self.pm.stack.select(self._complete_atom)
 
 	def test_invalid_atoms(self):
-		for atstr in ('<>foo', '=bar', '*/*::baz'):
-			self.assertRaises(InvalidAtomStringError, self.pm.Atom, atstr)
+		self.assertRaises(InvalidAtomStringError, self.pm.Atom, '<>foo')
+		self.assertRaises(InvalidAtomStringError, self.pm.Atom, '=bar')
+		self.assertRaises(InvalidAtomStringError, self.pm.Atom, '*/*::baz')
 
 	def test_incomplete_atom(self):
 		a = self._incomplete_atom
@@ -26,9 +27,14 @@ class UserSpecifiedAtomTestCase(PMTestCase):
 		self.assertTrue(a.complete)
 
 	def test_atom_stringification(self):
-		for atstr in ('foo/bar', '>=baz/bar-100', 'foo/baz:10',
-				'bar/baz::foo', '>=foo/fooz-29.5:bazmania', '~baz/inga-4.1:2::foo'):
-			self.assertEqual(atstr, str(self.pm.Atom(atstr)))
+		self.assertEqual('foo/bar', str(self.pm.Atom('foo/bar')))
+		self.assertEqual('>=baz/bar-100', str(self.pm.Atom('>=baz/bar-100')))
+		self.assertEqual('foo/baz:10', str(self.pm.Atom('foo/baz:10')))
+		self.assertEqual('bar/baz::foo', str(self.pm.Atom('bar/baz::foo')))
+		self.assertEqual('>=foo/fooz-29.5:bazmania',
+			str(self.pm.Atom('>=foo/fooz-29.5:bazmania')))
+		self.assertEqual('~baz/inga-4.1:2::foo',
+			str(self.pm.Atom('~baz/inga-4.1:2::foo')))
 
 	def test_atom_transformations(self):
 		a = self._associated_atom


             reply	other threads:[~2014-11-29  8:57 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-29  8:57 Michał Górny [this message]
  -- strict thread matches above, loose matches on Subject: below --
2014-11-29  8:57 [gentoo-commits] proj/gentoopm:master commit in: gentoopm/tests/ Michał Górny
2014-11-29  8:57 Michał Górny
2012-12-10 20:58 Michał Górny
2012-12-10 17:36 Michał Górny
2012-01-09 16:09 Michał Górny
2011-12-09 15:09 Michał Górny
2011-07-25 17:06 Michał Górny
2011-07-20  9:41 Michał Górny
2011-07-19  9:56 Michał Górny
2011-07-19  9:56 Michał Górny
2011-07-17 22:19 Michał Górny
2011-07-15 13:32 Michał Górny
2011-07-15 13:32 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-15  9:52 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=1417251369.a1ff52849d993e56be281a45d4b6f104799a5b12.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