Move betterproto/tests → tests
This commit is contained in:
parent
8864f4fdbd
commit
cebf9176a3
2
.gitignore
vendored
2
.gitignore
vendored
@ -6,7 +6,7 @@
|
||||
.pytest_cache
|
||||
.python-version
|
||||
build/
|
||||
betterproto/tests/output_*
|
||||
tests/output_*
|
||||
**/__pycache__
|
||||
dist
|
||||
**/*.egg-info
|
||||
|
4
Makefile
4
Makefile
@ -6,7 +6,7 @@ help: ## - Show this help.
|
||||
# Dev workflow tasks
|
||||
|
||||
generate: ## - Generate test cases (do this once before running test)
|
||||
poetry run ./betterproto/tests/generate.py
|
||||
poetry run ./tests/generate.py
|
||||
|
||||
test: ## - Run tests
|
||||
poetry run pytest --cov betterproto
|
||||
@ -23,7 +23,7 @@ clean: ## - Clean out generated files from the workspace
|
||||
.pytest_cache \
|
||||
dist \
|
||||
**/__pycache__ \
|
||||
betterproto/tests/output_*
|
||||
tests/output_*
|
||||
|
||||
# Manual testing
|
||||
|
||||
|
@ -50,7 +50,7 @@ You can add multiple `.proto` files to the test case, as long as one file matche
|
||||
`test_<name>.py` — *Custom test to validate specific aspects of the generated class*
|
||||
|
||||
```python
|
||||
from betterproto.tests.output_betterproto.bool.bool import Test
|
||||
from tests.output_betterproto.bool.bool import Test
|
||||
|
||||
def test_value():
|
||||
message = Test()
|
@ -6,7 +6,7 @@ import shutil
|
||||
import sys
|
||||
from typing import Set
|
||||
|
||||
from betterproto.tests.util import (
|
||||
from tests.util import (
|
||||
get_directories,
|
||||
inputs_path,
|
||||
output_path_betterproto,
|
@ -1,5 +1,5 @@
|
||||
import asyncio
|
||||
from betterproto.tests.output_betterproto.service.service import (
|
||||
from tests.output_betterproto.service.service import (
|
||||
DoThingResponse,
|
||||
DoThingRequest,
|
||||
GetThingRequest,
|
@ -1,4 +1,4 @@
|
||||
from betterproto.tests.output_betterproto.service.service import (
|
||||
from tests.output_betterproto.service.service import (
|
||||
DoThingResponse,
|
||||
DoThingRequest,
|
||||
GetThingRequest,
|
@ -1,4 +1,4 @@
|
||||
from betterproto.tests.output_betterproto.bool import Test
|
||||
from tests.output_betterproto.bool import Test
|
||||
|
||||
|
||||
def test_value():
|
@ -1,5 +1,5 @@
|
||||
import betterproto.tests.output_betterproto.casing as casing
|
||||
from betterproto.tests.output_betterproto.casing import Test
|
||||
import tests.output_betterproto.casing as casing
|
||||
from tests.output_betterproto.casing import Test
|
||||
|
||||
|
||||
def test_message_attributes():
|
@ -1,4 +1,4 @@
|
||||
from betterproto.tests.output_betterproto.casing_message_field_uppercase import Test
|
||||
from tests.output_betterproto.casing_message_field_uppercase import Test
|
||||
|
||||
|
||||
def test_message_casing():
|
@ -3,8 +3,8 @@ from typing import Any, Callable, Optional
|
||||
import betterproto.lib.google.protobuf as protobuf
|
||||
import pytest
|
||||
|
||||
from betterproto.tests.mocks import MockChannel
|
||||
from betterproto.tests.output_betterproto.googletypes_response import TestStub
|
||||
from tests.mocks import MockChannel
|
||||
from tests.output_betterproto.googletypes_response import TestStub
|
||||
|
||||
test_cases = [
|
||||
(TestStub.get_double, protobuf.DoubleValue, 2.5),
|
@ -1,7 +1,7 @@
|
||||
import pytest
|
||||
|
||||
from betterproto.tests.mocks import MockChannel
|
||||
from betterproto.tests.output_betterproto.googletypes_response_embedded import (
|
||||
from tests.mocks import MockChannel
|
||||
from tests.output_betterproto.googletypes_response_embedded import (
|
||||
Output,
|
||||
TestStub,
|
||||
)
|
@ -1,7 +1,7 @@
|
||||
import pytest
|
||||
|
||||
from betterproto.tests.mocks import MockChannel
|
||||
from betterproto.tests.output_betterproto.import_service_input_message import (
|
||||
from tests.mocks import MockChannel
|
||||
from tests.output_betterproto.import_service_input_message import (
|
||||
RequestResponse,
|
||||
TestStub,
|
||||
)
|
@ -1,6 +1,6 @@
|
||||
import betterproto
|
||||
from betterproto.tests.output_betterproto.oneof import Test
|
||||
from betterproto.tests.util import get_test_case_json_data
|
||||
from tests.output_betterproto.oneof import Test
|
||||
from tests.util import get_test_case_json_data
|
||||
|
||||
|
||||
def test_which_count():
|
@ -1,12 +1,12 @@
|
||||
import pytest
|
||||
|
||||
import betterproto
|
||||
from betterproto.tests.output_betterproto.oneof_enum import (
|
||||
from tests.output_betterproto.oneof_enum import (
|
||||
Move,
|
||||
Signal,
|
||||
Test,
|
||||
)
|
||||
from betterproto.tests.util import get_test_case_json_data
|
||||
from tests.util import get_test_case_json_data
|
||||
|
||||
|
||||
@pytest.mark.xfail
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user