sweepai / sweep

Sweep: open-source AI-powered Software Developer for small features and bug fixes.
https://sweep.dev
Other
7.47k stars 432 forks source link

Sweep: write unit tests for vector_db.py in vector_db_test.py #2529

Open kevinlu1248 opened 1 year ago

kevinlu1248 commented 1 year ago

Mock anything you don't understand the interface of. Look at github_utils.py for the interface for ClonedRepo. Don't test anything requiring redis.

Checklist - [X] Test `sweepai/core/vector_db_test.py` ✓ https://github.com/sweepai/sweep/commit/edc2a598430ee863a5c9516d990821cffde71cd8 - [X] Ran sandbox for `sweepai/core/vector_db_test.py`. ✗ - [X] Modify `sweepai/core/vector_db_test.py` ✓ https://github.com/sweepai/sweep/commit/1c0469f13b8b10124e1c4cde2fcb4256a2b6c60b - [X] Ran sandbox for `sweepai/core/vector_db_test.py`. ✗ - [X] Modify `sweepai/utils/scorer.py` ! No changes made - [X] Modify `sweepai/core/lexical_search.py` ✓ https://github.com/sweepai/sweep/commit/8aded1c9aaed169a123fc613d7e8bd895a0754f5 - [X] Ran sandbox for `sweepai/core/lexical_search.py`. ✗ - [X] Modify `pyproject.toml` ✓ https://github.com/sweepai/sweep/commit/5ce0ad295bbd6fcad82c2f640cdc80d0f2bef31f - [X] Ran sandbox for `pyproject.toml`. ✓ https://github.com/sweepai/sweep/commit/67933b35df21437fd10392cfd926e02489311502 - [X] Ran sandbox for `sweepai/core/lexical_search.py`. ✗ - [X] Modify `pyproject.toml` ! No changes made - [X] Ran sandbox for `sweepai/core/lexical_search.py`. ✗ - [X] Modify `sweepai/core/vector_db_test.py` ✓ https://github.com/sweepai/sweep/commit/5307f84f136847de240093d8e810ffdef1796cac - [X] Ran sandbox for `sweepai/core/vector_db_test.py`. ✗ - [X] Modify `pyproject.toml` ! No changes made - [X] Modify `sweepai/core/vector_db_test.py` ✓ https://github.com/sweepai/sweep/commit/4c8c3db84f96dbe22ba392d97d6847e725bd16eb - [X] Ran sandbox for `sweepai/core/vector_db_test.py`. ✗ - [ ] Ran sandbox for `sweepai/core/vector_db_test.py`. ⋯ - [ ] Ran sandbox for `sweepai/core/vector_db_test.py`. ▶ - [ ] Ran sandbox for `sweepai/core/vector_db_test.py`. ▶ ![Flowchart](http://24.199.78.105:8082/public/e4292b64bf555bfb91a9891eb792958059fa46d071f1ef7cf7250e39cada8032_2529_flowchart.svg)
sweep-nightly[bot] commented 1 year ago

Here's the PR! https://github.com/sweepai/sweep/pull/2622.

💎 Sweep Pro: I'm using GPT-4. You have unlimited GPT-4 tickets. (tracking ID: 8e277633ed)

Actions (click)

Sandbox Execution ✓

Here are the sandbox execution logs prior to making any changes:

Sandbox logs for 9643480
trunk check --fix --filter=-ruff --print-failures sweepai/agents/name_agent_test.py 1/4 ✓
Checked 1 file
✔ No issues
git add . && pre-commit run --files sweepai/agents/name_agent_test.py || exit 0 2/4 ✓
trim trailing whitespace.................................................Passed
fix end of files.........................................................Passed
check yaml...........................................(no files to check)Skipped
black....................................................................Passed
isort....................................................................Passed
autoflake................................................................Passed
if [[ "sweepai/agents/name_agent_test.py" == *.py ]]; then PYTHONPATH=. poetry run pylint --errors-only sweepai/agents/name_agent_test.py; else exit 0; fi 3/4 ✓
(nothing was outputted)
if [[ "sweepai/agents/name_agent_test.py" == *.py ]]; then PYTHONPATH=. poetry run python sweepai/agents/name_agent_test.py; else exit 0; fi 4/4 ✓
2023-11-23 06:44:32.596 | INFO     | sweepai.config.server::197 - No Sandbox URL found.
.......
----------------------------------------------------------------------
Ran 7 tests in 0.001s
OK

Sandbox passed on the latest main, so sandbox checks will be enabled for this issue.


Step 1: 🔎 Searching

I found the following snippets in your repository. I will now analyze these snippets and come up with a plan.

Some code snippets I looked at (click to expand). If some file is missing from here, you can mention the path in the ticket description. https://github.com/sweepai/sweep/blob/9643480905f3cedd8f418e11b74ddc0c3adc3ffb/sweepai/core/vector_db.py#L354-L415 https://github.com/sweepai/sweep/blob/9643480905f3cedd8f418e11b74ddc0c3adc3ffb/sweepai/utils/github_utils.py#L73-L164

Step 2: ⌨️ Coding

Test coverage generation failed with error:

s.sEs/root/.cache/pypoetry/virtualenvs/sweepai-gW_DSdP6-py3.10/lib/python3.10/site-packages/urllib3/connection.py:387: SystemTimeWarning: System time is way off (before 2022-01-01). This will probably lead to SSL verification errors
  warnings.warn(

FsE
======================================================================
ERROR: test_get_deeplake_vs_from_repo_with_none_cloned_repo (__main__.TestGetDeeplakeVsFromRepo)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.10/unittest/mock.py", line 1376, in patched
    with self.decoration_helper(patched,
  File "/usr/lib/python3.10/contextlib.py", line 135, in __enter__
    return next(self.gen)
  File "/usr/lib/python3.10/unittest/mock.py", line 1358, in decoration_helper
    arg = exit_stack.enter_context(patching)
  File "/usr/lib/python3.10/contextlib.py", line 492, in enter_context
    result = _cm_type.__enter__(cm)
  File "/usr/lib/python3.10/unittest/mock.py", line 1447, in __enter__
    original, local = self.get_original()
  File "/usr/lib/python3.10/unittest/mock.py", line 1420, in get_original
    raise AttributeError(
AttributeError: <module 'sweepai.utils.scorer' from '/repo/sweepai/utils/scorer.py'> does not have the attribute 'compute_vector_search_scores'

======================================================================
ERROR: test_search_index_with_empty_data (__main__.TestSearchIndex)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.10/unittest/mock.py", line 1376, in patched
    with self.decoration_helper(patched,
  File "/usr/lib/python3.10/contextlib.py", line 135, in __enter__
    return next(self.gen)
  File "/usr/lib/python3.10/unittest/mock.py", line 1358, in decoration_helper
    arg = exit_stack.enter_context(patching)
  File "/usr/lib/python3.10/contextlib.py", line 492, in enter_context
    result = _cm_type.__enter__(cm)
  File "/usr/lib/python3.10/unittest/mock.py", line 1447, in __enter__
    original, local = self.get_original()
  File "/usr/lib/python3.10/unittest/mock.py", line 1420, in get_original
    raise AttributeError(
AttributeError: <module 'sweepai.core.lexical_search' from '/repo/sweepai/core/lexical_search.py'> does not have the attribute 'nmslib'

======================================================================
FAIL: test_init_deeplake_vs_with_float_time (__main__.TestInitDeeplakeVs)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.10/unittest/mock.py", line 1379, in patched
    return func(*newargs, **newkeywargs)
  File "/repo/sweepai/core/vector_db_test.py", line 43, in test_init_deeplake_vs_with_float_time
    mock_VectorStore.assert_called_once_with(
  File "/usr/lib/python3.10/unittest/mock.py", line 940, in assert_called_once_with
    raise AssertionError(msg)
AssertionError: Expected 'VectorStore' to be called once. Called 0 times.

----------------------------------------------------------------------
Ran 8 tests in 1.292s

FAILED (failures=1, errors=2, skipped=4)

trunk check --fix --filter=-ruff --print-failures sweepai/core/vector_db_test.py 1/3 ✓
 ✔ Formatted sweepai/core/vector_db_test.py
Re-checking autofixed files...

Checked 1 file
✔ No issues
git add . && pre-commit run --files sweepai/core/vector_db_test.py || exit 0 2/3 ✓
trim trailing whitespace.................................................Passed
fix end of files.........................................................Passed
check yaml...........................................(no files to check)Skipped
black....................................................................Passed
isort....................................................................Passed
autoflake................................................................Passed
if [[ "sweepai/core/vector_db_test.py" == *.py ]]; then PYTHONPATH=. poetry run pylint --errors-only sweepai/core/vector_db_test.py; else exit 0; fi 3/3 ❌ (`2`)
************* Module sweepai.core.vector_db_test
sweepai/core/vector_db_test.py:67:25: E1121: Too many positional arguments for function call (too-many-function-args)
sweepai/core/vector_db_test.py:84:25: E1121: Too many positional arguments for function call (too-many-function-args)

trunk check --fix --filter=-ruff --print-failures sweepai/core/vector_db_test.py 1/4 ✓
 ✔ Formatted sweepai/core/vector_db_test.py
Re-checking autofixed files...

Checked 1 file
✔ No issues
git add . && pre-commit run --files sweepai/core/vector_db_test.py || exit 0 2/4 ✓
trim trailing whitespace.................................................Passed
fix end of files.........................................................Passed
check yaml...........................................(no files to check)Skipped
black....................................................................Passed
isort....................................................................Passed
autoflake................................................................Failed
- hook id: autoflake
- files were modified by this hook
if [[ "sweepai/core/vector_db_test.py" == *.py ]]; then PYTHONPATH=. poetry run pylint --errors-only sweepai/core/vector_db_test.py; else exit 0; fi 3/4 ✓
(nothing was outputted)
if [[ "sweepai/core/vector_db_test.py" == *.py ]]; then PYTHONPATH=. poetry run python sweepai/core/vector_db_test.py; else exit 0; fi 4/4 ❌ (`1`)
2023-11-23 07:10:50.226 | INFO     | sweepai.config.server::197 - No Sandbox URL found.
s.sEs/root/.cache/pypoetry/virtualenvs/sweepai-gW_DSdP6-py3.10/lib/python3.10/site-packages/urllib3/connection.py:387: SystemTimeWarning: System time is way off (before 2022-01-01). This will probably lead to SSL verification errors
  warnings.warn(

FsE
======================================================================
ERROR: test_get_deeplake_vs_from_repo_with_none_cloned_repo (__main__.TestGetDeeplakeVsFromRepo)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.10/unittest/mock.py", line 1376, in patched
    with self.decoration_helper(patched,
  File "/usr/lib/python3.10/contextlib.py", line 135, in __enter__
    return next(self.gen)
  File "/usr/lib/python3.10/unittest/mock.py", line 1358, in decoration_helper
    arg = exit_stack.enter_context(patching)
  File "/usr/lib/python3.10/contextlib.py", line 492, in enter_context
    result = _cm_type.__enter__(cm)
  File "/usr/lib/python3.10/unittest/mock.py", line 1447, in __enter__
    original, local = self.get_original()
  File "/usr/lib/python3.10/unittest/mock.py", line 1420, in get_original
    raise AttributeError(
AttributeError:  does not have the attribute 'compute_vector_search_scores'
======================================================================
ERROR: test_search_index_with_empty_data (__main__.TestSearchIndex)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.10/unittest/mock.py", line 1376, in patched
    with self.decoration_helper(patched,
  File "/usr/lib/python3.10/contextlib.py", line 135, in __enter__
    return next(self.gen)
  File "/usr/lib/python3.10/unittest/mock.py", line 1358, in decoration_helper
    arg = exit_stack.enter_context(patching)
  File "/usr/lib/python3.10/contextlib.py", line 492, in enter_context
    result = _cm_type.__enter__(cm)
  File "/usr/lib/python3.10/unittest/mock.py", line 1447, in __enter__
    original, local = self.get_original()
  File "/usr/lib/python3.10/unittest/mock.py", line 1420, in get_original
    raise AttributeError(
AttributeError:  does not have the attribute 'nmslib'
======================================================================
FAIL: test_init_deeplake_vs_with_float_time (__main__.TestInitDeeplakeVs)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.10/unittest/mock.py", line 1379, in patched
    return func(*newargs, **newkeywargs)
  File "/repo/sweepai/core/vector_db_test.py", line 45, in test_init_deeplake_vs_with_float_time
    mock_VectorStore.assert_called_once_with(
  File "/usr/lib/python3.10/unittest/mock.py", line 940, in assert_called_once_with
    raise AssertionError(msg)
AssertionError: Expected 'VectorStore' to be called once. Called 0 times.
----------------------------------------------------------------------
Ran 8 tests in 1.263s
FAILED (failures=1, errors=2, skipped=4)

trunk check --fix --filter=-ruff --print-failures sweepai/core/lexical_search.py 1/3 ✓
 ✔ Formatted sweepai/core/lexical_search.py
Re-checking autofixed files...

 ✔ Formatted sweepai/core/lexical_search.py
Re-checking autofixed files...

Checked 1 file
✔ No issues
git add . && pre-commit run --files sweepai/core/lexical_search.py || exit 0 2/3 ✓
trim trailing whitespace.................................................Passed
fix end of files.........................................................Passed
check yaml...........................................(no files to check)Skipped
black....................................................................Passed
isort....................................................................Passed
autoflake................................................................Passed
if [[ "sweepai/core/lexical_search.py" == *.py ]]; then PYTHONPATH=. poetry run pylint --errors-only sweepai/core/lexical_search.py; else exit 0; fi 3/3 ❌ (`2`)
************* Module sweepai.core.lexical_search
sweepai/core/lexical_search.py:7:0: E0401: Unable to import 'nmslib' (import-error)

trunk check --fix --filter=-ruff --print-failures pyproject.toml 1/4 ✓
 ✔ Formatted pyproject.toml
Re-checking autofixed files...

Checked 1 file
✔ No issues
git add . && pre-commit run --files pyproject.toml || exit 0 2/4 ✓
trim trailing whitespace.................................................Passed
fix end of files.........................................................Passed
check yaml...........................................(no files to check)Skipped
black................................................(no files to check)Skipped
isort................................................(no files to check)Skipped
autoflake............................................(no files to check)Skipped
if [[ "pyproject.toml" == *.py ]]; then PYTHONPATH=. poetry run pylint --errors-only pyproject.toml; else exit 0; fi 3/4 ✓
(nothing was outputted)
if [[ "pyproject.toml" == *.py ]]; then PYTHONPATH=. poetry run python pyproject.toml; else exit 0; fi 4/4 ✓
(nothing was outputted)

trunk check --fix --filter=-ruff --print-failures sweepai/core/lexical_search.py 1/3 ✓
 ✔ Formatted sweepai/core/lexical_search.py
Re-checking autofixed files...

 ✔ Formatted sweepai/core/lexical_search.py
Re-checking autofixed files...

Checked 1 file
✔ No issues
git add . && pre-commit run --files sweepai/core/lexical_search.py || exit 0 2/3 ✓
trim trailing whitespace.................................................Passed
fix end of files.........................................................Passed
check yaml...........................................(no files to check)Skipped
black....................................................................Passed
isort....................................................................Passed
autoflake................................................................Passed
if [[ "sweepai/core/lexical_search.py" == *.py ]]; then PYTHONPATH=. poetry run pylint --errors-only sweepai/core/lexical_search.py; else exit 0; fi 3/3 ❌ (`2`)
************* Module sweepai.core.lexical_search
sweepai/core/lexical_search.py:7:0: E0401: Unable to import 'nmslib' (import-error)

trunk check --fix --filter=-ruff --print-failures sweepai/core/lexical_search.py 1/3 ✓
 ✔ Formatted sweepai/core/lexical_search.py
Re-checking autofixed files...

 ✔ Formatted sweepai/core/lexical_search.py
Re-checking autofixed files...

Checked 1 file
✔ No issues
git add . && pre-commit run --files sweepai/core/lexical_search.py || exit 0 2/3 ✓
trim trailing whitespace.................................................Passed
fix end of files.........................................................Passed
check yaml...........................................(no files to check)Skipped
black....................................................................Passed
isort....................................................................Passed
autoflake................................................................Passed
if [[ "sweepai/core/lexical_search.py" == *.py ]]; then PYTHONPATH=. poetry run pylint --errors-only sweepai/core/lexical_search.py; else exit 0; fi 3/3 ❌ (`2`)
************* Module sweepai.core.lexical_search
sweepai/core/lexical_search.py:7:0: E0401: Unable to import 'nmslib' (import-error)

trunk check --fix --filter=-ruff --print-failures sweepai/core/vector_db_test.py 1/4 ✓
 ✔ Formatted sweepai/core/vector_db_test.py
Re-checking autofixed files...

Checked 1 file
✔ No issues
git add . && pre-commit run --files sweepai/core/vector_db_test.py || exit 0 2/4 ✓
trim trailing whitespace.................................................Passed
fix end of files.........................................................Passed
check yaml...........................................(no files to check)Skipped
black....................................................................Passed
isort....................................................................Passed
autoflake................................................................Failed
- hook id: autoflake
- files were modified by this hook
if [[ "sweepai/core/vector_db_test.py" == *.py ]]; then PYTHONPATH=. poetry run pylint --errors-only sweepai/core/vector_db_test.py; else exit 0; fi 3/4 ✓
(nothing was outputted)
if [[ "sweepai/core/vector_db_test.py" == *.py ]]; then PYTHONPATH=. poetry run python sweepai/core/vector_db_test.py; else exit 0; fi 4/4 ❌ (`1`)
Traceback (most recent call last):
  File "/repo/sweepai/core/vector_db_test.py", line 5, in 
    from sweepai.core.lexical_search import search_index
  File "/repo/sweepai/core/lexical_search.py", line 3, in 
    import nmslib
ModuleNotFoundError: No module named 'nmslib'

trunk check --fix --filter=-ruff --print-failures sweepai/core/vector_db_test.py 1/4 ✓
 ✔ Formatted sweepai/core/vector_db_test.py
Re-checking autofixed files...

 ✔ Formatted sweepai/core/vector_db_test.py
Re-checking autofixed files...

Checked 1 file
✔ No issues
git add . && pre-commit run --files sweepai/core/vector_db_test.py || exit 0 2/4 ✓
trim trailing whitespace.................................................Passed
fix end of files.........................................................Passed
check yaml...........................................(no files to check)Skipped
black....................................................................Passed
isort....................................................................Passed
autoflake................................................................Failed
- hook id: autoflake
- files were modified by this hook
if [[ "sweepai/core/vector_db_test.py" == *.py ]]; then PYTHONPATH=. poetry run pylint --errors-only sweepai/core/vector_db_test.py; else exit 0; fi 3/4 ✓
(nothing was outputted)
if [[ "sweepai/core/vector_db_test.py" == *.py ]]; then PYTHONPATH=. poetry run python sweepai/core/vector_db_test.py; else exit 0; fi 4/4 ❌ (`1`)
Traceback (most recent call last):
  File "/repo/sweepai/core/vector_db_test.py", line 6, in 
    from sweepai.core.lexical_search import search_index
  File "/repo/sweepai/core/lexical_search.py", line 3, in 
    import nmslib
ModuleNotFoundError: No module named 'nmslib'

trunk check --fix --filter=-ruff --print-failures sweepai/core/vector_db_test.py 1/4 ✓
 ✔ Formatted sweepai/core/vector_db_test.py
Re-checking autofixed files...

Checked 1 file
✔ No issues
git add . && pre-commit run --files sweepai/core/vector_db_test.py || exit 0 2/4 ✓
trim trailing whitespace.................................................Passed
fix end of files.........................................................Passed
check yaml...........................................(no files to check)Skipped
black....................................................................Passed
isort....................................................................Passed
autoflake................................................................Failed
- hook id: autoflake
- files were modified by this hook
if [[ "sweepai/core/vector_db_test.py" == *.py ]]; then PYTHONPATH=. poetry run pylint --errors-only sweepai/core/vector_db_test.py; else exit 0; fi 3/4 ✓
(nothing was outputted)
if [[ "sweepai/core/vector_db_test.py" == *.py ]]; then PYTHONPATH=. poetry run python sweepai/core/vector_db_test.py; else exit 0; fi 4/4 ❌ (`1`)
Traceback (most recent call last):
  File "/repo/sweepai/core/vector_db_test.py", line 5, in 
    from sweepai.core.lexical_search import search_index
  File "/repo/sweepai/core/lexical_search.py", line 3, in 
    import nmslib
ModuleNotFoundError: No module named 'nmslib'

trunk check --fix --filter=-ruff --print-failures sweepai/core/vector_db_test.py 1/4 ✓
 ✔ Formatted sweepai/core/vector_db_test.py
Re-checking autofixed files...

Checked 1 file
✔ No issues
git add . && pre-commit run --files sweepai/core/vector_db_test.py || exit 0 2/4 ✓
trim trailing whitespace.................................................Passed
fix end of files.........................................................Passed
check yaml...........................................(no files to check)Skipped
black....................................................................Passed
isort....................................................................Passed
autoflake................................................................Failed
- hook id: autoflake
- files were modified by this hook
if [[ "sweepai/core/vector_db_test.py" == *.py ]]; then PYTHONPATH=. poetry run pylint --errors-only sweepai/core/vector_db_test.py; else exit 0; fi 3/4 ✓
(nothing was outputted)
if [[ "sweepai/core/vector_db_test.py" == *.py ]]; then PYTHONPATH=. poetry run python sweepai/core/vector_db_test.py; else exit 0; fi 4/4 ❌ (`1`)
2023-11-23 07:10:50.226 | INFO     | sweepai.config.server::197 - No Sandbox URL found.
s.sEs/root/.cache/pypoetry/virtualenvs/sweepai-gW_DSdP6-py3.10/lib/python3.10/site-packages/urllib3/connection.py:387: SystemTimeWarning: System time is way off (before 2022-01-01). This will probably lead to SSL verification errors
  warnings.warn(

FsE
======================================================================
ERROR: test_get_deeplake_vs_from_repo_with_none_cloned_repo (__main__.TestGetDeeplakeVsFromRepo)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.10/unittest/mock.py", line 1376, in patched
    with self.decoration_helper(patched,
  File "/usr/lib/python3.10/contextlib.py", line 135, in __enter__
    return next(self.gen)
  File "/usr/lib/python3.10/unittest/mock.py", line 1358, in decoration_helper
    arg = exit_stack.enter_context(patching)
  File "/usr/lib/python3.10/contextlib.py", line 492, in enter_context
    result = _cm_type.__enter__(cm)
  File "/usr/lib/python3.10/unittest/mock.py", line 1447, in __enter__
    original, local = self.get_original()
  File "/usr/lib/python3.10/unittest/mock.py", line 1420, in get_original
    raise AttributeError(
AttributeError:  does not have the attribute 'compute_vector_search_scores'
======================================================================
ERROR: test_search_index_with_empty_data (__main__.TestSearchIndex)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.10/unittest/mock.py", line 1376, in patched
    with self.decoration_helper(patched,
  File "/usr/lib/python3.10/contextlib.py", line 135, in __enter__
    return next(self.gen)
  File "/usr/lib/python3.10/unittest/mock.py", line 1358, in decoration_helper
    arg = exit_stack.enter_context(patching)
  File "/usr/lib/python3.10/contextlib.py", line 492, in enter_context
    result = _cm_type.__enter__(cm)
  File "/usr/lib/python3.10/unittest/mock.py", line 1447, in __enter__
    original, local = self.get_original()
  File "/usr/lib/python3.10/unittest/mock.py", line 1420, in get_original
    raise AttributeError(
AttributeError:  does not have the attribute 'nmslib'
======================================================================
FAIL: test_init_deeplake_vs_with_float_time (__main__.TestInitDeeplakeVs)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.10/unittest/mock.py", line 1379, in patched
    return func(*newargs, **newkeywargs)
  File "/repo/sweepai/core/vector_db_test.py", line 45, in test_init_deeplake_vs_with_float_time
    mock_VectorStore.assert_called_once_with(
  File "/usr/lib/python3.10/unittest/mock.py", line 940, in assert_called_once_with
    raise AssertionError(msg)
AssertionError: Expected 'VectorStore' to be called once. Called 0 times.
----------------------------------------------------------------------
Ran 8 tests in 1.263s
FAILED (failures=1, errors=2, skipped=4)

trunk check --fix --filter=-ruff --print-failures sweepai/core/vector_db_test.py 1/3 ✓
 ✔ Formatted sweepai/core/vector_db_test.py
Re-checking autofixed files...

Checked 1 file
✔ No issues
git add . && pre-commit run --files sweepai/core/vector_db_test.py || exit 0 2/3 ✓
trim trailing whitespace.................................................Passed
fix end of files.........................................................Passed
check yaml...........................................(no files to check)Skipped
black....................................................................Passed
isort....................................................................Passed
autoflake................................................................Passed
if [[ "sweepai/core/vector_db_test.py" == *.py ]]; then PYTHONPATH=. poetry run pylint --errors-only sweepai/core/vector_db_test.py; else exit 0; fi 3/3 ❌ (`2`)
************* Module sweepai.core.vector_db_test
sweepai/core/vector_db_test.py:67:25: E1121: Too many positional arguments for function call (too-many-function-args)
sweepai/core/vector_db_test.py:84:25: E1121: Too many positional arguments for function call (too-many-function-args)


Step 3: 🔁 Code Review

I have finished reviewing the code for completeness. I did not find errors for sweep/vector-db-unit-tests_2.


🎉 Latest improvements to Sweep:


💡 To recreate the pull request edit the issue title or description. To tweak the pull request, leave a comment on the pull request. Join Our Discord