def test_sys_info():
    """Test printing of system information"""
    fname = op.join(temp_dir, 'info.txt')
    sys_info(fname)
    with open(fname, 'r') as fid:
        out = ''.join(fid.readlines())
    keys = ['Python', 'Backend', 'Pyglet']  # 'GL version' only for non-GLUT
    for key in keys:
        assert_true(key in out)
Example #2
0
def test_sys_info():
    """Test printing of system information"""
    fname = op.join(temp_dir, 'info.txt')
    sys_info(fname)
    assert_raises(IOError, sys_info, fname)  # no overwrite
    with open(fname, 'r') as fid:
        out = ''.join(fid.readlines())
    # Note: 'GL version' only for non-GLUT
    keys = ['Python', 'Backend', 'pyglet', 'Platform:']
    for key in keys:
        assert_in(key, out)
Example #3
0
def test_sys_info():
    """Test printing of system information"""
    fname = op.join(temp_dir, "info.txt")
    sys_info(fname)
    assert_raises(IOError, sys_info, fname)  # no overwrite
    with open(fname, "r") as fid:
        out = "".join(fid.readlines())
    keys = ["GL version", "Python", "Backend", "pyglet", "Platform:"]
    for key in keys:
        assert_in(key, out)
    print(out)
    assert_true("Info-gathering error" not in out)
Example #4
0
def test_sys_info():
    """Test printing of system information"""
    fname = op.join(temp_dir, 'info.txt')
    sys_info(fname)
    assert_raises(IOError, sys_info, fname)  # no overwrite
    with open(fname, 'r') as fid:
        out = ''.join(fid.readlines())
    keys = ['GL version', 'Python', 'Backend', 'pyglet', 'Platform:']
    for key in keys:
        assert_in(key, out)
    print(out)
    assert_true('Info-gathering error' not in out)