Skip to content

Commit 9a3f878

Browse files
authored
Merge pull request #7 from bytewax/module_name
Change module name to match PyPI
2 parents 0de73ab + e670520 commit 9a3f878

File tree

3 files changed

+14
-15
lines changed

3 files changed

+14
-15
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,3 +87,5 @@ pyrightconfig.json
8787
# Devenv stuff
8888
.devenv.flake.nix
8989
devenv.*
90+
91+
dump.rdb

pyproject.toml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[project]
2-
name = "bytewax_redis"
2+
name = "bytewax-redis"
33
version = "0.1"
44
description = "A Bytewax connector for Redis"
55
readme = "README.md"
@@ -37,7 +37,10 @@ requires = ["setuptools>=43.0.0", "wheel"]
3737
build-backend = "setuptools.build_meta"
3838

3939
[tool.pytest.ini_options]
40-
addopts = "-v"
40+
addopts = "-v -m \"not integration\""
41+
markers = [
42+
"integration: requires a local redis server",
43+
]
4144

4245
[tool.mypy]
4346
disallow_untyped_defs = true

pytests/test_bytewax_redis.py

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,7 @@
1010
from bytewax.testing import TestingSink, TestingSource, run_main
1111

1212

13-
@mark.skipif(
14-
os.environ.get("REDIS_HOST") is None
15-
or os.environ.get("REDIS_PORT") is None
16-
or os.environ.get("REDIS_DB") is None
17-
or os.environ.get("REDIS_STREAM") is None,
18-
reason="A running Redis instance has to be configured for this test",
19-
)
13+
@mark.integration
2014
def test_redis_stream_roundtrip() -> None:
2115
# Get redis config values.
2216
redis_host = os.environ.get("REDIS_HOST", "localhost")
@@ -78,12 +72,7 @@ def run_flow(out: list) -> None:
7872
assert out == expected
7973

8074

81-
@mark.skipif(
82-
os.environ.get("REDIS_HOST") is None
83-
or os.environ.get("REDIS_PORT") is None
84-
or os.environ.get("REDIS_DB") is None,
85-
reason="A running Redis instance has to be configured for this test",
86-
)
75+
@mark.integration
8776
def test_kv_sink() -> None:
8877
# Get redis config values.
8978
redis_host = os.environ.get("REDIS_HOST", "localhost")
@@ -112,3 +101,8 @@ def test_kv_sink() -> None:
112101
# Now check that the data is there
113102
assert redis_conn.get("key-1") == b"3"
114103
assert redis_conn.get("key-2") == b"5"
104+
105+
106+
# Test here to avoid exit code 5 from Pytest runs
107+
def test_placeholder() -> None:
108+
pass

0 commit comments

Comments
 (0)