Skip to content

Commit 27653c7

Browse files
committed
pytest marker for tests that run full grpc server
Signed-off-by: Sreekanth <prsreekanth920@gmail.com>
1 parent aa02a8a commit 27653c7

17 files changed

Lines changed: 40 additions & 0 deletions

packages/pynumaflow/Makefile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,12 @@ lint: format
1717
test:
1818
uv run pytest tests/ -rA
1919

20+
test-unit:
21+
uv run pytest tests/ -m "not integration" -rA
22+
23+
test-integration:
24+
uv run pytest tests/ -m integration -rA
25+
2026

2127
setup:
2228
uv sync --all-groups

packages/pynumaflow/pyproject.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,9 @@ log_cli = true
9292
log_cli_level = "DEBUG"
9393
log_cli_format = "%(asctime)s [%(levelname)8s] %(message)s (%(filename)s:%(lineno)s)"
9494
log_cli_date_format = "%Y-%m-%d %H:%M:%S"
95+
markers = [
96+
"integration: tests that start real gRPC servers on Unix sockets (slower)",
97+
]
9598

9699
[tool.ruff]
97100
line-length = 100

packages/pynumaflow/tests/accumulator/test_async_accumulator.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@
2323
get_time_args,
2424
)
2525

26+
pytestmark = pytest.mark.integration
27+
2628
LOGGER = setup_logging(__name__)
2729

2830
SOCK_PATH = "unix:///tmp/accumulator.sock"

packages/pynumaflow/tests/accumulator/test_async_accumulator_err.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020
get_time_args,
2121
)
2222

23+
pytestmark = pytest.mark.integration
24+
2325
LOGGER = setup_logging(__name__)
2426

2527
SOCK_PATH = "unix:///tmp/accumulator_err.sock"

packages/pynumaflow/tests/batchmap/test_async_batch_map.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
from pynumaflow.proto.mapper import map_pb2_grpc
2020
from tests.batchmap.utils import request_generator
2121

22+
pytestmark = pytest.mark.integration
23+
2224
LOGGER = setup_logging(__name__)
2325

2426
listen_addr = "unix:///tmp/batch_map.sock"

packages/pynumaflow/tests/batchmap/test_async_batch_map_err.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
from pynumaflow.proto.mapper import map_pb2_grpc
1212
from tests.batchmap.utils import request_generator
1313

14+
pytestmark = pytest.mark.integration
15+
1416
LOGGER = setup_logging(__name__)
1517

1618
raise_error = False

packages/pynumaflow/tests/map/test_async_mapper.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
from pynumaflow.proto.mapper import map_pb2, map_pb2_grpc
2020
from tests.map.utils import get_test_datums
2121

22+
pytestmark = pytest.mark.integration
23+
2224
LOGGER = setup_logging(__name__)
2325

2426
# if set to true, map handler will raise a `ValueError` exception.

packages/pynumaflow/tests/mapstream/test_async_map_stream.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,11 @@
1515
)
1616
from pynumaflow.proto.mapper import map_pb2_grpc
1717
from tests.mapstream.utils import request_generator
18+
1819
import pytest
1920

21+
pytestmark = pytest.mark.integration
22+
2023
LOGGER = setup_logging(__name__)
2124

2225
# if set to true, map handler will raise a `ValueError` exception.

packages/pynumaflow/tests/mapstream/test_async_map_stream_err.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
from pynumaflow.proto.mapper import map_pb2_grpc
1212
from tests.mapstream.utils import request_generator
1313

14+
pytestmark = pytest.mark.integration
15+
1416
LOGGER = setup_logging(__name__)
1517

1618
SOCK_PATH = "unix:///tmp/async_map_stream_err.sock"

packages/pynumaflow/tests/reduce/test_async_reduce.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@
2424
get_time_args,
2525
)
2626

27+
pytestmark = pytest.mark.integration
28+
2729
logging.basicConfig(level=logging.DEBUG)
2830
LOGGER = logging.getLogger(__name__)
2931

0 commit comments

Comments
 (0)