betodealmeida commented on a change in pull request #17655:
URL: https://github.com/apache/superset/pull/17655#discussion_r765161352



##########
File path: tests/unit_tests/dataframe_test.py
##########
@@ -0,0 +1,55 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+# pylint: disable=unused-argument, import-outside-toplevel
+from superset.dataframe import df_to_records
+from superset.typing import DbapiDescription
+
+
+def test_df_to_records(app_context: None) -> None:
+    from superset.db_engine_specs import BaseEngineSpec
+    from superset.result_set import SupersetResultSet
+
+    data = [("a1", "b1", "c1"), ("a2", "b2", "c2")]
+    cursor_descr: DbapiDescription = [
+        (column, "string", None, None, None, None, False) for column in ("a", 
"b", "c")
+    ]
+    results = SupersetResultSet(data, cursor_descr, BaseEngineSpec)
+    df = results.to_pandas_df()
+
+    assert df_to_records(df) == [
+        {"a": "a1", "b": "b1", "c": "c1"},
+        {"a": "a2", "b": "b2", "c": "c2"},
+    ]
+
+
+def test_js_max_int(app_context: None) -> None:

Review comment:
       Same here. It's a weird behavior of pytest, but we specify which 
fixtures we want based on their names.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to