Skip to content

Commit

Permalink
multiple: disable socket for unit tests (#29080)
Browse files Browse the repository at this point in the history
  • Loading branch information
efriis authored Jan 7, 2025
1 parent 539ebd5 commit fcc9cdd
Show file tree
Hide file tree
Showing 24 changed files with 123 additions and 19 deletions.
5 changes: 4 additions & 1 deletion libs/partners/anthropic/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ all: help
TEST_FILE ?= tests/unit_tests/
integration_test integration_tests: TEST_FILE=tests/integration_tests/

test tests integration_test integration_tests:
test tests:
poetry run pytest -vvv --timeout 30 --disable-socket --allow-unix-socket $(TEST_FILE)

integration_test integration_tests:
poetry run pytest -vvv --timeout 30 $(TEST_FILE)

test_watch:
Expand Down
2 changes: 1 addition & 1 deletion libs/partners/anthropic/poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions libs/partners/anthropic/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ pytest-watcher = "^0.3.4"
pytest-asyncio = "^0.21.1"
defusedxml = "^0.7.1"
pytest-timeout = "^2.3.1"
pytest-socket = "^0.7.0"

[tool.poetry.group.codespell.dependencies]
codespell = "^2.2.0"
Expand Down
5 changes: 4 additions & 1 deletion libs/partners/chroma/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ all: help
TEST_FILE ?= tests/unit_tests/
integration_test integration_tests: TEST_FILE = tests/integration_tests/

test tests integration_test integration_tests:
test tests:
poetry run pytest --disable-socket --allow-unix-socket $(TEST_FILE)

integration_test integration_tests:
poetry run pytest $(TEST_FILE)

test_watch:
Expand Down
16 changes: 15 additions & 1 deletion libs/partners/chroma/poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 14 additions & 2 deletions libs/partners/chroma/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,11 @@ syrupy = "^4.0.2"
pytest-watcher = "^0.3.4"
pytest-asyncio = "^0.21.1"
# hack to make sure py3.9 compatible versionof onnxruntime is installed for testing
onnxruntime = [{version = "<1.20", python = "<3.10"}, {version = "*", python = ">=3.10"}]
onnxruntime = [
{ version = "<1.20", python = "<3.10" },
{ version = "*", python = ">=3.10" },
]
pytest-socket = "^0.7.0"
[[tool.poetry.group.test.dependencies.langchain-core]]
path = "../../core"
develop = true
Expand All @@ -94,15 +98,22 @@ python = "<3.9"
path = "../../standard-tests"
develop = true


[tool.poetry.group.codespell.dependencies]
codespell = "^2.2.0"


[tool.poetry.group.test_integration.dependencies]


[tool.poetry.group.lint.dependencies]
ruff = "^0.5"
# hack to make sure py3.9 compatible versionof onnxruntime is installed for testing
onnxruntime = [{version = "<1.20", python = "<3.10"}, {version = "*", python = ">=3.10"}]
onnxruntime = [
{ version = "<1.20", python = "<3.10" },
{ version = "*", python = ">=3.10" },
]


[tool.poetry.group.dev.dependencies]
[[tool.poetry.group.dev.dependencies.langchain-core]]
Expand All @@ -114,6 +125,7 @@ python = ">=3.9"
version = ">=0.1.40,<0.3"
python = "<3.9"


[tool.poetry.group.typing.dependencies]
mypy = "^1.10"
types-requests = "^2.31.0.20240406"
Expand Down
5 changes: 4 additions & 1 deletion libs/partners/fireworks/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ all: help
TEST_FILE ?= tests/unit_tests/
integration_test integration_tests: TEST_FILE = tests/integration_tests/

test tests integration_test integration_tests:
test tests:
poetry run pytest --disable-socket --allow-unix-socket $(TEST_FILE)

integration_test integration_tests:
poetry run pytest $(TEST_FILE)

test_watch:
Expand Down
2 changes: 1 addition & 1 deletion libs/partners/fireworks/poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions libs/partners/fireworks/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ pytest-mock = "^3.10.0"
syrupy = "^4.0.2"
pytest-watcher = "^0.3.4"
pytest-asyncio = "^0.21.1"
pytest-socket = "^0.7.0"

[tool.poetry.group.codespell.dependencies]
codespell = "^2.2.0"
Expand Down
5 changes: 4 additions & 1 deletion libs/partners/huggingface/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ TEST_FILE ?= tests/unit_tests/

integration_test integration_tests: TEST_FILE=tests/integration_tests/

test tests integration_test integration_tests:
test tests:
poetry run pytest --disable-socket --allow-unix-socket $(TEST_FILE)

integration_test integration_tests:
poetry run pytest $(TEST_FILE)

test_watch:
Expand Down
16 changes: 15 additions & 1 deletion libs/partners/huggingface/poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions libs/partners/huggingface/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ optional = true
pytest = "^7.3.0"
pytest-asyncio = "^0.21.1"
pytest-watcher = "^0.3.4"
pytest-socket = "^0.7.0"

[[tool.poetry.group.test.dependencies.scipy]]
version = "^1"
Expand Down
5 changes: 4 additions & 1 deletion libs/partners/pinecone/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ all: help
TEST_FILE ?= tests/unit_tests/
integration_test integration_tests: TEST_FILE = tests/integration_tests/

test tests integration_test integration_tests:
test tests:
poetry run pytest --disable-socket --allow-unix-socket $(TEST_FILE)

integration_test integration_tests:
poetry run pytest $(TEST_FILE)

test_watch:
Expand Down
2 changes: 1 addition & 1 deletion libs/partners/pinecone/poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions libs/partners/pinecone/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ pytest-mock = "^3.10.0"
syrupy = "^4.0.2"
pytest-watcher = "^0.3.4"
pytest-asyncio = ">=0.25.0,<1"
pytest-socket = "^0.7.0"

[tool.poetry.group.codespell.dependencies]
codespell = "^2.2.0"
Expand Down
5 changes: 4 additions & 1 deletion libs/partners/qdrant/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ TEST_FILE ?= tests/unit_tests/

integration_test integration_tests: TEST_FILE = tests/integration_tests/

test tests integration_test integration_tests:
test tests:
poetry run pytest --disable-socket --allow-unix-socket $(TEST_FILE)

integration_test integration_tests:
poetry run pytest $(TEST_FILE)

test_watch:
Expand Down
18 changes: 16 additions & 2 deletions libs/partners/qdrant/poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions libs/partners/qdrant/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ syrupy = "^4.0.2"
pytest-watcher = "^0.3.4"
pytest-asyncio = "^0.21.1"
requests = "^2.31.0"
pytest-socket = "^0.7.0"
[[tool.poetry.group.test.dependencies.langchain-core]]
path = "../../core"
develop = true
Expand Down
5 changes: 4 additions & 1 deletion libs/partners/voyageai/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ all: help
TEST_FILE ?= tests/unit_tests/
integration_test integration_tests: TEST_FILE=tests/integration_tests/

test tests integration_test integration_tests:
test tests:
poetry run pytest --disable-socket --allow-unix-socket $(TEST_FILE)

integration_test integration_tests:
poetry run pytest $(TEST_FILE)

test_watch:
Expand Down
16 changes: 15 additions & 1 deletion libs/partners/voyageai/poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions libs/partners/voyageai/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ pytest-mock = "^3.10.0"
syrupy = "^4.0.2"
pytest-watcher = "^0.3.4"
pytest-asyncio = "^0.21.1"
pytest-socket = "^0.7.0"
[[tool.poetry.group.test.dependencies.numpy]]
version = "^1.24.0"
python = "<3.12"
Expand Down
5 changes: 4 additions & 1 deletion libs/partners/xai/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ TEST_FILE ?= tests/unit_tests/

integration_test integration_tests: TEST_FILE=tests/integration_tests/

test tests integration_test integration_tests:
test tests:
poetry run pytest --disable-socket --allow-unix-socket $(TEST_FILE)

integration_test integration_tests:
poetry run pytest $(TEST_FILE)

######################
Expand Down
2 changes: 1 addition & 1 deletion libs/partners/xai/poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions libs/partners/xai/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,15 @@ docarray = "^0.32.1"
langchain-openai = { path = "../openai", develop = true }
langchain-core = { path = "../../core", develop = true }
langchain-tests = { path = "../../standard-tests", develop = true }
pytest-socket = "^0.7.0"



[tool.poetry.group.codespell.dependencies]
codespell = "^2.2.0"



[tool.poetry.group.test_integration.dependencies]
[[tool.poetry.group.test_integration.dependencies.numpy]]
version = "^1"
Expand All @@ -91,15 +94,18 @@ version = "^1.26.0"
python = ">=3.12"



[tool.poetry.group.lint.dependencies]
ruff = "^0.5"



[tool.poetry.group.typing.dependencies]
mypy = "^1.10"
types-requests = "^2"
langchain-core = { path = "../../core", develop = true }



[tool.poetry.group.dev.dependencies]
langchain-core = { path = "../../core", develop = true }

0 comments on commit fcc9cdd

Please sign in to comment.