class TestEmailBase(unittest.TestCase):
def ndiffAssertEqual(self, first, second):
"""Like assertEqual except use ndiff for readable output."""
- if first <> second:
+ if first != second:
sfirst = str(first)
ssecond = str(second)
diff = difflib.ndiff(sfirst.splitlines(), ssecond.splitlines())
# Try a charset with None body encoding
c = Charset('us-ascii')
eq('hello world', c.body_encode('hello world'))
- # Try the convert argument, where input codec <> output codec
+ # Try the convert argument, where input codec != output codec
c = Charset('euc-jp')
# With apologies to Tokio Kikuchi ;)
try:
class TestEmailBase(unittest.TestCase):
def ndiffAssertEqual(self, first, second):
"""Like assertEqual except use ndiff for readable output."""
- if first <> second:
+ if first != second:
sfirst = str(first)
ssecond = str(second)
diff = difflib.ndiff(sfirst.splitlines(), ssecond.splitlines())
# Try a charset with None body encoding
c = Charset('us-ascii')
eq('hello world', c.body_encode('hello world'))
- # Try the convert argument, where input codec <> output codec
+ # Try the convert argument, where input codec != output codec
c = Charset('euc-jp')
# With apologies to Tokio Kikuchi ;)
try:
"Content-Length: %d\r\n"
"\r\n%s" % (h.error_status,len(h.error_body),h.error_body))
- self.assertTrue(h.stderr.getvalue().find("AssertionError")<>-1)
+ self.assertNotEqual(h.stderr.getvalue().find("AssertionError"), -1)
def testErrorAfterOutput(self):
MSG = "Some output has been sent"
self.assertEqual(h.stdout.getvalue(),
"Status: 200 OK\r\n"
"\r\n"+MSG)
- self.assertTrue(h.stderr.getvalue().find("AssertionError")<>-1)
+ self.assertNotEqual(h.stderr.getvalue().find("AssertionError"), -1)
def testHeaderFormats(self):