Ejemplo n.º 1
0
 def test_bytes_different(self):
     if PY2:
         expected = ("\n" "'12345678901'\n" '!=\n' "'12345678902'")
     else:
         expected = ("\n" "b'12345678901'\n" '!=\n' "b'12345678902'")
     self.check_raises(BytesLiteral('12345678901'),
                       BytesLiteral('12345678902'), expected)
Ejemplo n.º 2
0
 def test_unicode_string_different(self):
     if PY2:
         expected = "u'a' != 'b'"
     else:
         expected = "'a' != b'b'"
     self.check_raises(
         UnicodeLiteral('a'), BytesLiteral('b'),
         expected
         )
Ejemplo n.º 3
0
 def some_callable(command, stdin):
     return PopenBehaviour(BytesLiteral(command), BytesLiteral(stdin),
                           1, 345, 0)