Exemplo n.º 1
0
def test_can_report_when_system_locale_is_ascii(monkeypatch):
    import io
    read, write = os.pipe()
    read = io.open(read, 'r', encoding='ascii')
    write = io.open(write, 'w', encoding='ascii')
    monkeypatch.setattr(sys, 'stdout', write)
    reporting.default(u"☃")
Exemplo n.º 2
0
def test_can_report_when_system_locale_is_ascii(monkeypatch):
    import io
    read, write = os.pipe()
    with io.open(read, 'r', encoding='ascii') as read:
        with io.open(write, 'w', encoding='ascii') as write:
            monkeypatch.setattr(sys, 'stdout', write)
            reporting.default(u"☃")
def test_can_report_when_system_locale_is_ascii(monkeypatch):
    import io

    read, write = os.pipe()
    with io.open(read, "r", encoding="ascii") as read:
        with io.open(write, "w", encoding="ascii") as write:
            monkeypatch.setattr(sys, "stdout", write)
            reporting.default(u"☃")
Exemplo n.º 4
0
def test_can_report_when_system_locale_is_ascii(monkeypatch):
    import io

    read, write = os.pipe()
    with io.open(read, "r", encoding="ascii") as read:
        with io.open(write, "w", encoding="ascii") as write:
            monkeypatch.setattr(sys, "stdout", write)
            reporting.default(u"☃")