This is an automated email from the ASF dual-hosted git repository.

beto pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/superset.git


The following commit(s) were added to refs/heads/master by this push:
     new 08183df  feat: add unit test for LimitMethod.FETCH_MANY (#13364)
08183df is described below

commit 08183dfe57b7c4d01c745528baa670c459a51445
Author: Beto Dealmeida <[email protected]>
AuthorDate: Mon Mar 1 10:55:37 2021 -0800

    feat: add unit test for LimitMethod.FETCH_MANY (#13364)
---
 tests/db_engine_specs/base_engine_spec_tests.py | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/tests/db_engine_specs/base_engine_spec_tests.py 
b/tests/db_engine_specs/base_engine_spec_tests.py
index 5055265..57dd3cb 100644
--- a/tests/db_engine_specs/base_engine_spec_tests.py
+++ b/tests/db_engine_specs/base_engine_spec_tests.py
@@ -20,7 +20,11 @@ from unittest import mock
 import pytest
 
 from superset.db_engine_specs import engines
-from superset.db_engine_specs.base import BaseEngineSpec, builtin_time_grains
+from superset.db_engine_specs.base import (
+    BaseEngineSpec,
+    builtin_time_grains,
+    LimitMethod,
+)
 from superset.db_engine_specs.sqlite import SqliteEngineSpec
 from superset.sql_parse import ParsedQuery
 from superset.utils.core import get_example_database
@@ -154,6 +158,14 @@ class TestDbEngineSpecs(TestDbEngineSpec):
             """SELECT 'LIMIT 777'""", """SELECT 'LIMIT 777'\nLIMIT 1000"""
         )
 
+    def test_limit_with_fetch_many(self):
+        class DummyEngineSpec(BaseEngineSpec):
+            limit_method = LimitMethod.FETCH_MANY
+
+        self.sql_limit_regex(
+            "SELECT * FROM table", "SELECT * FROM table", DummyEngineSpec
+        )
+
     def test_time_grain_denylist(self):
         with app.app_context():
             app.config["TIME_GRAIN_DENYLIST"] = ["PT1M"]

Reply via email to