Skip to content

Commit

Permalink
fix: add buf marker to allow running tests if buf is known not be ins…
Browse files Browse the repository at this point in the history
…tallable
  • Loading branch information
cpcloud committed Nov 29, 2021
1 parent 0c69da3 commit 50847d9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
7 changes: 7 additions & 0 deletions protoletariat/tests/test_rewrite.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,7 @@ def test_example_protoc(
assert out.joinpath("__init__.py").exists()


@pytest.mark.buf
def test_example_buf(
cli: CliRunner,
tmp_path: Path,
Expand Down Expand Up @@ -282,6 +283,7 @@ def test_example_buf(
assert out.joinpath("__init__.py").exists()


@pytest.mark.buf
def test_nested_buf(
cli: CliRunner,
tmp_path: Path,
Expand Down Expand Up @@ -354,6 +356,7 @@ def test_nested_buf(
raises=subprocess.CalledProcessError,
reason="grpc-cpp cannot be installed with conda using Python 3.10",
)
@pytest.mark.buf
def test_grpc_buf(
cli: CliRunner,
tmp_path: Path,
Expand Down Expand Up @@ -410,6 +413,7 @@ def test_grpc_buf(
raises=subprocess.CalledProcessError,
reason="grpc-cpp cannot be installed with conda using Python 3.10",
)
@pytest.mark.buf
def test_grpc_buf_no_imports(
cli: CliRunner,
tmp_path: Path,
Expand Down Expand Up @@ -454,6 +458,7 @@ def test_grpc_buf_no_imports(
raises=subprocess.CalledProcessError,
reason="grpc-cpp cannot be installed with conda using Python 3.10",
)
@pytest.mark.buf
def test_pyi(
cli: CliRunner,
tmp_path: Path,
Expand Down Expand Up @@ -505,6 +510,7 @@ def test_pyi(
raises=subprocess.CalledProcessError,
reason="grpc-cpp cannot be installed with conda using Python 3.10",
)
@pytest.mark.buf
def test_pyi_with_imports(
cli: CliRunner,
tmp_path: Path,
Expand Down Expand Up @@ -558,6 +564,7 @@ def test_pyi_with_imports(
importlib.import_module("out_grpc_imports.imports_service_pb2_grpc")


@pytest.mark.buf
def test_pyi_with_long_names(
cli: CliRunner,
tmp_path: Path,
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ addopts = [
"--ignore=.direnv",
"--strict-markers"
]
markers = ["buf"]
norecursedirs = ["site-packages", "dist-packages", ".direnv"]

[tool.poetry2conda]
Expand Down

0 comments on commit 50847d9

Please sign in to comment.