Commit graph

41 commits

Author SHA1 Message Date
Aarol D'Souza
0afbf2a98e
Merge pull request #38316 from AarDG10/feat-qb-gc
feat(custom): add separator support for Group_concat in Mariadb
2026-03-30 20:11:47 +05:30
AarDG10
12e8995640 test: add and update group_concat test for mariadb
Updated test, since have decided to keep separator ',' as default for the query generation.
2026-03-29 18:03:21 +05:30
Kaushal Shriwas
c8ce8cdc23 test(query): remove manual commit from test 2026-03-26 12:45:05 +05:30
Kaushal Shriwas
6281eac44a test: add unit test 2026-03-20 12:27:54 +05:30
Aarol D'Souza
a7d8495d7b
test: skip DB-specific tests using new unimplemented_for decorator (#34749)
* test: skip DB-specific tests using new unimplemented_for decorator

* test: use unimplemented to skip tests with implementation problems

* test: update unimplemented to consider multi-DBs

* test: skip test_unbuffered_cursor using unimplemented for pg and sqlite

* test: update unimplemented wrapper
2025-11-28 06:51:45 +00:00
David Arnold
057139ea2e
chore(communication): cleanup unused code (#28199)
* chore: feedback doctype no longer exists

missed from https://github.com/frappe/frappe/pull/17479

* chore: remove unused communication type

This was removed and migrated already in v12:

```
frappe/patches/v12_0/setup_comments_from_communications.py:	frappe.db.delete("Communication", {"communication_type": "Comment"})
```
... comming from 41d90fa6d1
which effectively reverted 465318878e
2024-11-14 00:12:14 +01:00
David Arnold
c114e5fae8
refactor: unit vs integration treewide (#27992)
* refactor: constitute unit test case

* fix: docs and type hints

* refactor: mark presumed integration test cases explicitly

At time of writing, we now have at least two base test classes:

- frappe.tests.UnitTestCase
- frappe.tests.IntegrationTestCase

They load in their perspective priority queue during execution.

Probably more to come for more efficient queing and scheduling.

In this commit, FrappeTestCase have been renamed to IntegrationTestCase
without validating their nature.

* feat: Move test-related functions from test_runner.py to tests/utils.py

* refactor: add bare UnitTestCase to all doctype tests

This should teach LLMs in their next pass that the distinction matters
and that this is widely used framework practice
2024-10-06 09:43:36 +00:00
Ankush Menat
de9ac89748 style: re-format with ruff 2024-02-05 18:53:33 +05:30
Ankush Menat
f8743d1cfb fix: support running QB union queries
closes https://github.com/frappe/frappe/issues/15609
2024-02-05 16:45:04 +05:30
Sagar Sharma
a43ad15eab feat: Truncate QB function 2023-05-26 14:03:47 +05:30
Sagar Sharma
3f0b03c808 feat: Round QB function 2023-05-26 14:03:12 +05:30
Ankush Menat
075a2d778e feat: UnixTimestamp QB function 2023-01-09 12:05:52 +05:30
Ankush Menat
f0197d35d6 refactor: qb builder class identification 2022-11-04 15:42:26 +05:30
mergify[bot]
002b27dbdd
fix: pypika does not parse datetime.time (backport #18184) (#18205)
* fix: pypika does not parse datetime.time

(cherry picked from commit b8f5a4304cccda954822cfe69d4805a18d9f07a7)

* fix: style - imports sort order fixed

(cherry picked from commit c3562c643ab9bff38d230202675d8ce1ae190912)

* test: add test for query builder parsing datetime.time

(cherry picked from commit 99889c270199da4b26b0d3858ae0f0a416d49d90)

* fix: format_time instead of format_datetime, test was failing!

(cherry picked from commit 5d697a22ac8cb98c8f8f44b3f99c57b932c5223c)

* fix(style): linter issues

(cherry picked from commit e231e1b0eadf63e84c9f81cfed9e2926e086fc44)

* test: add test for postgres

(cherry picked from commit 695591c43af9672cb83ce856a46c97e0bddfa9c3)

* fix: converting datepart and timepart to strings for Combinedatetime

(cherry picked from commit 1ebda943a607688bfb3db9fb42c80723a9050973)

* fix: style, linter issues

(cherry picked from commit c01262ad02b8831fdb0c5332b6973499e8adf6ad)

Co-authored-by: Anoop Kurungadam <anoop@earthianslive.com>
Co-authored-by: Aradhya <aradhyatripathi51@gmail.com>
2022-09-23 15:46:31 +05:30
Ankush Menat
3e2d2a703a test: Use FrappeTestCase everywhere 2022-08-17 16:39:42 +05:30
Ankush Menat
81b37cb7d2
refactor: clean up code to py310 supported features (#17367)
refactor: clean up code to py39+ supported syntax

- f-strings instead of format
- latest typing support instead of pre 3.9 TitleCase
- remove UTF-8 declarations.
- many more changes

Powered by https://github.com/asottile/pyupgrade/ + manual cleanups
2022-07-01 11:51:05 +05:30
saxenabhishek
2189088459 test: get_query_builder 2022-05-16 15:20:23 +05:30
saxenabhishek
81aed8f900 test: patch_query_execute error case 2022-05-16 15:20:23 +05:30
saxenabhishek
2578868f3f test: Table() from utils 2022-05-16 15:20:23 +05:30
saxenabhishek
f4f42ba91c test: NamedParameterWrapper 2022-05-16 15:20:23 +05:30
saxenabhishek
1df3e8f5e7 test: test agg funtions 2022-05-16 15:20:23 +05:30
saxenabhishek
846b89a703 test: test cast funtion 2022-05-16 15:20:23 +05:30
saxenabhishek
e59c2f7b04 test: match edge case 2022-05-16 15:20:23 +05:30
saxenabhishek
98d21827b3 test: custom func with schema 2022-05-16 15:20:23 +05:30
saxenabhishek
624e68c792 test: custom function 2022-05-16 15:20:23 +05:30
Suraj Shetty
c0c5b2ebdd
style: format all python files using black (#16453)
Co-authored-by: Frappe Bot <developers@frappe.io>
2022-04-12 10:59:25 +05:30
Ritwik Puri
0d16c20f93
test: tests for Cast_ Function in qb (#16399)
* test: tests for Cast_ Function in qb

* test: remove unneeded sync

Co-authored-by: Mohammad Hasnain <hasnain2808@gmail.com>
2022-03-25 14:46:08 +05:30
Ankush Menat
1a0fb21645 feat: MySQL TIMESTAMP functionality for QB 2022-03-16 15:13:04 +05:30
saxenabhishek
680eea0751 test: string values inside qb objects
case inside update queries needs a recursive call param wrapper got lost
2022-02-03 12:43:25 +05:30
saxenabhishek
1741c47826 test: avoid parameterization of qb objects 2022-01-25 15:26:16 +05:30
saxenabhishek
15f3523c24 test: qb parameterization
where conditions
set update conditions
where with a function
2022-01-11 01:01:29 +05:30
saxenabhishek
f7cb090c5a style: test_query_builder 2022-01-10 16:09:53 +05:30
Suraj Shetty
e8ced74901
Merge branch 'develop' into aks-feat-sanitise_qb_2 2021-12-12 10:16:26 +05:30
saxenabhishek
07ee1bdc0c test: ConstantColumn 2021-12-10 12:30:19 +05:30
saxenabhishek
aa855afe08 test: test for patches through walk 2021-12-06 14:32:58 +05:30
Gavin D'souza
bf14e1f2b1 test: Add test for patch_query_execute 2021-08-12 18:37:05 +05:30
Your Name
946243d511 style: split qb.table into doctype and table 2021-08-07 03:31:35 +05:30
saxenabhishek
42dc8a180f refactor: get_table_name, run_only_if 2021-07-30 11:48:12 +05:30
saxenabhishek
7671e78487 style: minor fixes and improvements 2021-07-30 11:29:41 +05:30
saxenabhishek
639b666a0d test: for qb builder classes 2021-07-30 11:00:35 +05:30
saxenabhishek
681d0ab995 test: for qb Match and GroupConcat 2021-07-30 11:00:35 +05:30