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)
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 )
def some_callable(command, stdin): return PopenBehaviour(BytesLiteral(command), BytesLiteral(stdin), 1, 345, 0)