Skip to content

chore: add sqlite3 to conftest#38475

Merged
asukaminato0721 merged 1 commit into
langgenius:mainfrom
asukaminato0721:sqlite3-as-unittest-backend
Jul 7, 2026
Merged

chore: add sqlite3 to conftest#38475
asukaminato0721 merged 1 commit into
langgenius:mainfrom
asukaminato0721:sqlite3-as-unittest-backend

Conversation

@asukaminato0721

Copy link
Copy Markdown
Contributor

Important

  1. Make sure you have read our contribution guidelines
  2. Ensure there is an associated issue and you have been assigned to it
  3. Use the correct syntax to link this PR: Fixes #<issue number>.

Summary

#38159

Screenshots

Before After
... ...

Checklist

  • This change requires a documentation update, included: Dify Document
  • I understand that this PR may be closed in case there was no previous discussion or issues. (This doesn't apply to typos!)
  • I've added a test for each change that was introduced, and I tried as much as possible to make a single atomic change.
  • I've updated the documentation accordingly.
  • I ran make lint && make type-check (backend) and cd web && pnpm exec vp staged (frontend) to appease the lint gods

@dosubot dosubot Bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Jul 6, 2026
@asukaminato0721 asukaminato0721 enabled auto-merge July 6, 2026 10:31
@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Pyrefly Diff

base → PR
--- /tmp/pyrefly_base.txt	2026-07-06 10:32:39.168867680 +0000
+++ /tmp/pyrefly_pr.txt	2026-07-06 10:32:25.938749823 +0000
@@ -1868,38 +1868,36 @@
    --> tests/unit_tests/commands/test_data_migration_commands.py:183:12
 ERROR `(self: list[Unknown], object: Unknown, /) -> None` is not assignable to attribute `echo` with type `(message: Any | None = None, file: IO[Any] | None = None, nl: bool = True, err: bool = False, color: bool | None = None) -> None` [bad-assignment]
    --> tests/unit_tests/commands/test_data_migration_wizard.py:142:33
-ERROR Generator function should return `Generator` [bad-return]
-  --> tests/unit_tests/commands/test_legacy_model_type_migration.py:36:38
 ERROR Object of class `FromClause` has no attribute `insert` [missing-attribute]
-   --> tests/unit_tests/commands/test_legacy_model_type_migration.py:204:13
+   --> tests/unit_tests/commands/test_legacy_model_type_migration.py:195:13
 ERROR Argument `list[SimpleNamespace] | list[Unknown]` is not assignable to parameter `rows` with type `list[object]` in function `FakeExecuteResult.__init__` [bad-argument-type]
-   --> tests/unit_tests/commands/test_legacy_model_type_migration.py:405:38
+   --> tests/unit_tests/commands/test_legacy_model_type_migration.py:396:38
 ERROR Object of class `object` has no attribute `scope` [missing-attribute]
-   --> tests/unit_tests/commands/test_legacy_model_type_migration.py:429:12
+   --> tests/unit_tests/commands/test_legacy_model_type_migration.py:420:12
 ERROR Argument `list[SimpleNamespace] | list[Unknown]` is not assignable to parameter `rows` with type `list[object]` in function `FakeExecuteResult.__init__` [bad-argument-type]
-   --> tests/unit_tests/commands/test_legacy_model_type_migration.py:461:38
+   --> tests/unit_tests/commands/test_legacy_model_type_migration.py:452:38
 ERROR Object of class `object` has no attribute `callback` [missing-attribute]
-   --> tests/unit_tests/commands/test_legacy_model_type_migration.py:551:5
+   --> tests/unit_tests/commands/test_legacy_model_type_migration.py:542:5
 ERROR Object of class `object` has no attribute `callback` [missing-attribute]
-   --> tests/unit_tests/commands/test_legacy_model_type_migration.py:612:5
+   --> tests/unit_tests/commands/test_legacy_model_type_migration.py:603:5
 ERROR Object of class `TextIOBase` has no attribute `name` [missing-attribute]
-   --> tests/unit_tests/commands/test_legacy_model_type_migration.py:625:17
+   --> tests/unit_tests/commands/test_legacy_model_type_migration.py:616:17
 ERROR Class `object` has no class attribute `__table__` [missing-attribute]
-   --> tests/unit_tests/commands/test_legacy_model_type_migration.py:709:48
+   --> tests/unit_tests/commands/test_legacy_model_type_migration.py:700:48
 ERROR Class `object` has no class attribute `__table__` [missing-attribute]
-   --> tests/unit_tests/commands/test_legacy_model_type_migration.py:788:48
+   --> tests/unit_tests/commands/test_legacy_model_type_migration.py:779:48
 ERROR Class `object` has no class attribute `__table__` [missing-attribute]
-   --> tests/unit_tests/commands/test_legacy_model_type_migration.py:891:48
+   --> tests/unit_tests/commands/test_legacy_model_type_migration.py:882:48
 ERROR Class `object` has no class attribute `__table__` [missing-attribute]
-   --> tests/unit_tests/commands/test_legacy_model_type_migration.py:969:48
+   --> tests/unit_tests/commands/test_legacy_model_type_migration.py:960:48
 ERROR Class `object` has no class attribute `__table__` [missing-attribute]
-    --> tests/unit_tests/commands/test_legacy_model_type_migration.py:1024:42
+    --> tests/unit_tests/commands/test_legacy_model_type_migration.py:1015:42
 ERROR Class member `SlowLineOutput.write` overrides a member in a parent class but is missing an `@override` decorator [missing-override-decorator]
-    --> tests/unit_tests/commands/test_legacy_model_type_migration.py:1092:13
+    --> tests/unit_tests/commands/test_legacy_model_type_migration.py:1083:13
 ERROR Argument `object` is not assignable to parameter `orig` with type `BaseException` in function `sqlalchemy.exc.DBAPIError.__init__` [bad-argument-type]
-    --> tests/unit_tests/commands/test_legacy_model_type_migration.py:1394:44
+    --> tests/unit_tests/commands/test_legacy_model_type_migration.py:1385:44
 ERROR Argument `SimpleNamespace` is not assignable to parameter `orig` with type `BaseException` in function `sqlalchemy.exc.DBAPIError.__init__` [bad-argument-type]
-    --> tests/unit_tests/commands/test_legacy_model_type_migration.py:1418:57
+    --> tests/unit_tests/commands/test_legacy_model_type_migration.py:1409:57
 ERROR Expected a callable, got `None` [not-callable]
   --> tests/unit_tests/commands/test_reset_encrypt_key_pair.py:18:9
 ERROR Object of class `ModuleType` has no attribute `upgrade` [missing-attribute]
@@ -1913,9 +1911,9 @@
 ERROR Object of class `FunctionType` has no attribute `assert_called_once_with` [missing-attribute]
   --> tests/unit_tests/commands/test_upgrade_db.py:85:5
 ERROR Object of class `ModuleType` has no attribute `redis_client` [missing-attribute]
-  --> tests/unit_tests/conftest.py:48:13
+  --> tests/unit_tests/conftest.py:52:13
 ERROR Object of class `ModuleType` has no attribute `pubsub_redis_client` [missing-attribute]
-  --> tests/unit_tests/conftest.py:50:13
+  --> tests/unit_tests/conftest.py:54:13
 ERROR No attribute `MethodView` in module `builtins` [missing-attribute]
  --> tests/unit_tests/controllers/common/test_fields.py:8:5
 ERROR Cannot index into `object` [bad-index]

@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Pyrefly Type Coverage

Metric Base PR Delta
Type coverage 52.39% 52.39% 0.00%
Strict coverage 51.90% 51.90% 0.00%
Typed symbols 32,092 32,092 0
Untyped symbols 29,442 29,442 0
Modules 2970 2970 0

@41tair 41tair left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@asukaminato0721 asukaminato0721 added this pull request to the merge queue Jul 7, 2026
@dosubot dosubot Bot added the lgtm This PR has been approved by a maintainer label Jul 7, 2026
Merged via the queue into langgenius:main with commit f3ba284 Jul 7, 2026
31 checks passed
@asukaminato0721 asukaminato0721 deleted the sqlite3-as-unittest-backend branch July 7, 2026 05:19
agarwalpranav0711 pushed a commit to agarwalpranav0711/dify that referenced this pull request Jul 7, 2026
lyzno1 pushed a commit that referenced this pull request Jul 7, 2026
@lyzno1 lyzno1 mentioned this pull request Jul 7, 2026
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm This PR has been approved by a maintainer size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants