Skip to content

Commit 3d8adc2

Browse files
test(memory): add an end-to-end integration test (#94)
* test(memory): add an end-to-end integration test * test: refactor code to be more readable --------- Co-authored-by: Jack Yuan <[email protected]>
1 parent 44f5d23 commit 3d8adc2

File tree

3 files changed

+443
-10
lines changed

3 files changed

+443
-10
lines changed

pyproject.toml

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,9 @@ mem0_memory = [
8383
[tool.hatch.envs.hatch-static-analysis]
8484
features = ["mem0_memory"]
8585
dependencies = [
86-
"strands-agents>=0.1.0,<1.0.0",
87-
"mypy>=0.981,<1.0.0",
88-
"ruff>=0.4.4,<0.5.0",
86+
"strands-agents>=0.1.0,<1.0.0",
87+
"mypy>=0.981,<1.0.0",
88+
"ruff>=0.4.4,<0.5.0",
8989
]
9090

9191
[tool.hatch.envs.hatch-static-analysis.scripts]
@@ -140,7 +140,7 @@ list = [
140140
"echo 'Scripts commands available for default env:'; hatch env show --json | jq --raw-output '.default.scripts | keys[]'"
141141
]
142142
format = [
143-
"hatch fmt --formatter",
143+
"hatch fmt --formatter",
144144
]
145145
test-format = [
146146
"hatch fmt --formatter --check",
@@ -154,6 +154,9 @@ test-lint = [
154154
test = [
155155
"hatch test --cover --cov-report html --cov-report xml {args}"
156156
]
157+
test-integ = [
158+
"hatch test tests-integ {args}"
159+
]
157160

158161
[tool.mypy]
159162
python_version = "3.10"
@@ -173,14 +176,14 @@ ignore_missing_imports = false
173176

174177
[tool.ruff]
175178
line-length = 120
176-
include = ["src/**/*.py", "tests/**/*.py"]
179+
include = ["src/**/*.py", "tests/**/*.py","tests-integ/**/*.py"]
177180

178181
[tool.ruff.lint]
179182
select = [
180-
"E", # pycodestyle
181-
"F", # pyflakes
182-
"I", # isort
183-
"B", # flake8-bugbear
183+
"E", # pycodestyle
184+
"F", # pyflakes
185+
"I", # isort
186+
"B", # flake8-bugbear
184187
]
185188

186189
[tool.coverage.run]
@@ -196,6 +199,12 @@ directory = "build/coverage/html"
196199
[tool.coverage.xml]
197200
output = "build/coverage/coverage.xml"
198201

202+
[tool.pytest.ini_options]
203+
testpaths = [
204+
"tests"
205+
]
206+
pythonpath = ["src"]
207+
199208
[tool.commitizen]
200209
name = "cz_conventional_commits"
201210
tag_format = "v$version"

src/strands_tools/mem0_memory.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@
140140
"description": "Optional metadata to store with the memory",
141141
},
142142
},
143-
"required": ["action"]
143+
"required": ["action"],
144144
}
145145
},
146146
}

0 commit comments

Comments
 (0)