示例#1
0
def test_with_path_result_code(tmpdir):
    """
	result code should be non-zero on error
	"""
    params = ['-c', "raise ValueError()"]
    res = launch.with_path(str(tmpdir), params)
    assert res > 0
示例#2
0
文件: test_launch.py 项目: jaraco/rwt
def test_with_path_result_code(tmpdir):
	"""
	result code should be non-zero on error
	"""
	params = ['-c', "raise ValueError()"]
	res = launch.with_path(str(tmpdir), params)
	assert res > 0
示例#3
0
def test_with_path(tmpdir, capfd):
    params = ['-c', 'import sys; print(sys.path)']
    res = launch.with_path(str(tmpdir), params)
    assert res == 0
    out, err = capfd.readouterr()
    assert str(tmpdir) in out
示例#4
0
def test_with_path(tmpdir, capfd):
    params = ['-c', 'import sys; sys.stdout.write("\\n".join(sys.path))']
    res = launch.with_path(str(tmpdir), params)
    assert res == 0
    out, err = capfd.readouterr()
    assert tmpdir in out.split(os.linesep)
示例#5
0
文件: test_launch.py 项目: jaraco/rwt
def test_with_path(tmpdir, capfd):
	params = ['-c', 'import sys; print(sys.path)']
	res = launch.with_path(str(tmpdir), params)
	assert res == 0
	out, err = capfd.readouterr()
	assert str(tmpdir) in out