Merge lp:~danilo/pygettextpo/pep8-fixes into lp:pygettextpo

Proposed by Данило Шеган
Status: Needs review
Proposed branch: lp:~danilo/pygettextpo/pep8-fixes
Merge into: lp:pygettextpo
Diff against target: 54 lines (+9/-1)
1 file modified
test_gettextpo.py (+9/-1)
To merge this branch: bzr merge lp:~danilo/pygettextpo/pep8-fixes
Reviewer Review Type Date Requested Status
Benji York (community) code Approve
Review via email: mp+92615@code.launchpad.net

Description of the change

Provide minimal PEP-8 whitespace fixes so pep8 tool doesn't complain.

Tested with "pep8 *.py".

To post a comment you must log in.
Revision history for this message
Benji York (benji) wrote :

Looks good. Long live consistent whitespace!

review: Approve (code)
Revision history for this message
Colin Watson (cjwatson) wrote :

I've converted pygettextpo to git and merged this branch (though I can't mark this MP as Merged):

  https://git.launchpad.net/pygettextpo/commit/?id=682497c4c61c29514cae59028fdfed0128e69ee9

Unmerged revisions

25. By Данило Шеган

Minimal PEP-8 fixes.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'test_gettextpo.py'
--- test_gettextpo.py 2009-06-02 15:31:25 +0000
+++ test_gettextpo.py 2012-02-11 11:17:17 +0000
@@ -4,11 +4,14 @@
4import unittest4import unittest
5import gettextpo5import gettextpo
66
7
7class PoFileTestCase(unittest.TestCase):8class PoFileTestCase(unittest.TestCase):
9
8 def testCreateEmpty(self):10 def testCreateEmpty(self):
9 # Test that we can create an empty pofile object11 # Test that we can create an empty pofile object
10 pofile = gettextpo.PoFile()12 pofile = gettextpo.PoFile()
11 self.assertEquals(list(iter(pofile)), [])13 self.assertEquals(list(iter(pofile)), [])
14
12 def testAddMessage(self):15 def testAddMessage(self):
13 # Test that we can add messages to a new pofile object16 # Test that we can add messages to a new pofile object
14 pofile = gettextpo.PoFile()17 pofile = gettextpo.PoFile()
@@ -18,6 +21,7 @@
18 poiter.insert(msg)21 poiter.insert(msg)
1922
20 self.assertEquals(list(iter(pofile)), [msg])23 self.assertEquals(list(iter(pofile)), [msg])
24
21 def testAddMessageTwice(self):25 def testAddMessageTwice(self):
22 # A message object can only be added to one pofile object26 # A message object can only be added to one pofile object
23 pofile1 = gettextpo.PoFile()27 pofile1 = gettextpo.PoFile()
@@ -31,7 +35,9 @@
31 poiter = iter(pofile2)35 poiter = iter(pofile2)
32 self.assertRaises(ValueError, poiter.insert, msg)36 self.assertRaises(ValueError, poiter.insert, msg)
3337
38
34class PoMessageTestCase(unittest.TestCase):39class PoMessageTestCase(unittest.TestCase):
40
35 def testCreateMessage(self):41 def testCreateMessage(self):
36 # Test that messages can be created.42 # Test that messages can be created.
37 msg = gettextpo.PoMessage()43 msg = gettextpo.PoMessage()
@@ -47,7 +53,7 @@
47 msg = gettextpo.PoMessage()53 msg = gettextpo.PoMessage()
48 msg.set_msgstr('Hello World')54 msg.set_msgstr('Hello World')
49 self.assertEquals(msg.msgstr, 'Hello World')55 self.assertEquals(msg.msgstr, 'Hello World')
50 56
51 def testSetMsgStrPlural(self):57 def testSetMsgStrPlural(self):
52 # Test handling of plural msgstrs. The PoMessage object can58 # Test handling of plural msgstrs. The PoMessage object can
53 # not hold plural msgstrs if the msgid does not have a plural.59 # not hold plural msgstrs if the msgid does not have a plural.
@@ -63,7 +69,9 @@
63 msg.set_msgstr_plural(2, 'Two')69 msg.set_msgstr_plural(2, 'Two')
64 self.assertEquals(msg.msgstr_plural, ['Zero', 'One', 'Two'])70 self.assertEquals(msg.msgstr_plural, ['Zero', 'One', 'Two'])
6571
72
66class CheckFormatTestCase(unittest.TestCase):73class CheckFormatTestCase(unittest.TestCase):
74
67 def testGoodFormat(self):75 def testGoodFormat(self):
68 # Check that no exception is raised on a good translation.76 # Check that no exception is raised on a good translation.
6977

Subscribers

People subscribed via source and target branches