1 |
commit: a1ff52849d993e56be281a45d4b6f104799a5b12 |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Nov 29 08:56:09 2014 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Nov 29 08:56:09 2014 +0000 |
6 |
URL: http://sources.gentoo.org/gitweb/?p=proj/gentoopm.git;a=commit;h=a1ff5284 |
7 |
|
8 |
Unroll loops in tests for cleaner output |
9 |
|
10 |
--- |
11 |
gentoopm/tests/atom.py | 16 +++++++++++----- |
12 |
1 file changed, 11 insertions(+), 5 deletions(-) |
13 |
|
14 |
diff --git a/gentoopm/tests/atom.py b/gentoopm/tests/atom.py |
15 |
index c166d4d..74d1b28 100644 |
16 |
--- a/gentoopm/tests/atom.py |
17 |
+++ b/gentoopm/tests/atom.py |
18 |
@@ -14,8 +14,9 @@ class UserSpecifiedAtomTestCase(PMTestCase): |
19 |
self._associated_atom = self.pm.stack.select(self._complete_atom) |
20 |
|
21 |
def test_invalid_atoms(self): |
22 |
- for atstr in ('<>foo', '=bar', '*/*::baz'): |
23 |
- self.assertRaises(InvalidAtomStringError, self.pm.Atom, atstr) |
24 |
+ self.assertRaises(InvalidAtomStringError, self.pm.Atom, '<>foo') |
25 |
+ self.assertRaises(InvalidAtomStringError, self.pm.Atom, '=bar') |
26 |
+ self.assertRaises(InvalidAtomStringError, self.pm.Atom, '*/*::baz') |
27 |
|
28 |
def test_incomplete_atom(self): |
29 |
a = self._incomplete_atom |
30 |
@@ -26,9 +27,14 @@ class UserSpecifiedAtomTestCase(PMTestCase): |
31 |
self.assertTrue(a.complete) |
32 |
|
33 |
def test_atom_stringification(self): |
34 |
- for atstr in ('foo/bar', '>=baz/bar-100', 'foo/baz:10', |
35 |
- 'bar/baz::foo', '>=foo/fooz-29.5:bazmania', '~baz/inga-4.1:2::foo'): |
36 |
- self.assertEqual(atstr, str(self.pm.Atom(atstr))) |
37 |
+ self.assertEqual('foo/bar', str(self.pm.Atom('foo/bar'))) |
38 |
+ self.assertEqual('>=baz/bar-100', str(self.pm.Atom('>=baz/bar-100'))) |
39 |
+ self.assertEqual('foo/baz:10', str(self.pm.Atom('foo/baz:10'))) |
40 |
+ self.assertEqual('bar/baz::foo', str(self.pm.Atom('bar/baz::foo'))) |
41 |
+ self.assertEqual('>=foo/fooz-29.5:bazmania', |
42 |
+ str(self.pm.Atom('>=foo/fooz-29.5:bazmania'))) |
43 |
+ self.assertEqual('~baz/inga-4.1:2::foo', |
44 |
+ str(self.pm.Atom('~baz/inga-4.1:2::foo'))) |
45 |
|
46 |
def test_atom_transformations(self): |
47 |
a = self._associated_atom |