Пример #1
0
def test_runner_ascii(patched_func):
    cmd = ['cat', os.path.join(TEST_DIR,'ascii_text.txt')]
    for line in run_command(cmd):
        if type(line) == int:
            assert_eq(line, 0)
        else:
            assert_eq(line.rstrip(), 'Hello ASCII!')
Пример #2
0
def test_runner_ascii(patched_func):
    cmd = ['cat', os.path.join(TEST_DIR, 'ascii_text.txt')]
    for line in run_command(cmd):
        if type(line) == int:
            assert_eq(line, 0)
        else:
            assert_eq(line.rstrip(), 'Hello ASCII!')
Пример #3
0
def test_runner_unicode(patched_func):
    cmd = ['cat', os.path.join(TEST_DIR,'unicode_text.txt')]
    for line in run_command(cmd):
        if type(line) == int:
            assert_eq(line, 0)
        else:
            if line.rstrip() != 'Hello Unicode\u203d':
                print('WARNING: Unicode reading not supported!')
Пример #4
0
def test_runner_unicode(patched_func):
    cmd = ['cat', os.path.join(TEST_DIR, 'unicode_text.txt')]
    for line in run_command(cmd):
        if type(line) == int:
            assert_eq(line, 0)
        else:
            if line.rstrip() != 'Hello Unicode\u203d':
                print('WARNING: Unicode reading not supported!')