Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit fe5bd4f

Browse files
committed
PEP8 the tests
1 parent 659a1a3 commit fe5bd4f

1 file changed

Lines changed: 17 additions & 12 deletions

File tree

tests/test_bidi.py

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,18 @@ def test_implict_with_upper_is_rtl(self):
5151
(u'car is THE CAR in arabic', u'car is RAC EHT in arabic'),
5252
(u'CAR IS the car IN ENGLISH', u'HSILGNE NI the car SI RAC'),
5353
(u'he said "IT IS 123, 456, OK"', u'he said "KO ,456 ,123 SI TI"'),
54-
(u'he said "IT IS (123, 456), OK"', u'he said "KO ,(456 ,123) SI TI"'),
54+
(u'he said "IT IS (123, 456), OK"',
55+
u'he said "KO ,(456 ,123) SI TI"'),
5556
(u'he said "IT IS 123,456, OK"', u'he said "KO ,123,456 SI TI"'),
56-
(u'he said "IT IS (123,456), OK"', u'he said "KO ,(123,456) SI TI"'),
57+
(u'he said "IT IS (123,456), OK"',
58+
u'he said "KO ,(123,456) SI TI"'),
5759
(u'HE SAID "it is 123, 456, ok"', u'"it is 123, 456, ok" DIAS EH'),
5860
(u'<H123>shalom</H123>', u'<123H/>shalom<123H>'),
5961
(u'<h123>SAALAM</h123>', u'<h123>MALAAS</h123>'),
60-
(u'HE SAID "it is a car!" AND RAN', u'NAR DNA "!it is a car" DIAS EH'),
61-
(u'HE SAID "it is a car!x" AND RAN', u'NAR DNA "it is a car!x" DIAS EH'),
62+
(u'HE SAID "it is a car!" AND RAN',
63+
u'NAR DNA "!it is a car" DIAS EH'),
64+
(u'HE SAID "it is a car!x" AND RAN',
65+
u'NAR DNA "it is a car!x" DIAS EH'),
6266
(u'SOLVE 1*5 1-5 1/5 1+5', u'1+5 1/5 1-5 5*1 EVLOS'),
6367
(u'THE RANGE IS 2.5..5', u'5..2.5 SI EGNAR EHT'),
6468
(u'-2 CELSIUS IS COLD', u'DLOC SI SUISLEC 2-'),
@@ -75,33 +79,34 @@ def test_override_base_dir(self):
7579
storage = u'SHALOM:'
7680
display = u'MOLAHS:'
7781

78-
self.assertEqual(get_display(storage, upper_is_rtl=True, base_dir='L'), display)
79-
80-
82+
self.assertEqual(get_display(storage, upper_is_rtl=True, base_dir='L'),
83+
display)
8184

8285
def test_output_encoding(self):
8386
"""Make sure the display is in the same encdoing as the incoming text"""
8487

85-
storage = six.b('\xf9\xec\xe5\xed') # Hebrew word shalom in cp1255
88+
storage = six.b('\xf9\xec\xe5\xed') # Hebrew word shalom in cp1255
8689
display = six.b('\xed\xe5\xec\xf9')
8790

8891
self.assertEqual(get_display(storage, encoding='cp1255'), display)
8992

90-
9193
def test_explicit_with_upper_is_rtl(self):
9294
"""Explicit tests"""
9395
tests = (
9496
(u'this is _LJUST_o', u'this is JUST'),
9597
(u'a _lsimple _RteST_o th_oat', u'a simple TSet that'),
9698
(u'HAS A _LPDF missing', u'PDF missing A SAH'),
97-
(u'AnD hOw_L AbOuT, 123,987 tHiS_o', u'w AbOuT, 123,987 tHiSOh DnA'),
99+
(u'AnD hOw_L AbOuT, 123,987 tHiS_o',
100+
u'w AbOuT, 123,987 tHiSOh DnA'),
98101
(u'a GOOD - _L_oTEST.', u'a TSET - DOOG.'),
99102
(u'here_L is_o_o_o _R a good one_o', u'here is eno doog a '),
100103
(u'THE _rbest _lONE and', u'best ENO and EHT'),
101104
(u'A REAL BIG_l_o BUG!', u'!GUB GIB LAER A'),
102-
(u'a _L_L_L_L_L_L_L_L_L_L_L_L_L_L_L_L_L_L_L_L_L_L_L_L_L_L_L_L_L_L_L_Rbug', u'a gub'),
105+
(u'a _L_L_L_L_L_L_L_L_L_L_L_L_L_L_L_L_L_L_L_L_L_L_L_L_L_L_L_L_L_L_L_Rbug',
106+
u'a gub'),
103107
# FIXME the following commented explicit test fails
104-
# (u'AN ARABIC _l_o 123-456 NICE ONE!', u'!ENO ECIN 456-123 CIBARA NA'),
108+
# (u'AN ARABIC _l_o 123-456 NICE ONE!',
109+
# u'!ENO ECIN 456-123 CIBARA NA'),
105110
(u'AN ARABIC _l _o 123-456 PAIR', u'RIAP 123-456 CIBARA NA'),
106111
(u'this bug 67_r_o89 catched!', u'this bug 6789 catched!'),
107112
)

0 commit comments

Comments
 (0)