test_patch_install.py 778 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import pytest

try:
    import vllm
except ImportError:
    vllm = None  # type: ignore

pytestmark = pytest.mark.pre_merge


# TODO: Consider `pytest.mark.vllm` and running tests based on environment
@pytest.mark.skipif(vllm is None, reason="Skipping vllm tests, vllm not installed")
def test_version():
    # Verify that the image has the patched version of vllm
    assert vllm.__version__ == "0.6.3.post2.dev16+gf61960ce"


@pytest.mark.skipif(vllm is None, reason="Skipping vllm tests, vllm not installed")
def test_patch_imports():
    # Verify patched files have no glaring syntax or import issues
21
22
23
24
25
    import vllm.distributed.data_plane as d
    import vllm.distributed.kv_cache as k

    # Placeholder to avoid unused import errors or removal by linters
    assert d, k