langflow/src/backend/tests
Cristhian Zanforlin Lousa 7b85505117
feat: Improve data handling and text formatting (loop fix) (#6771)
* 📝 (loop.py): Improve code readability and semantics by updating the return condition in the LoopComponent class
📝 (data.py): Enhance the data_to_text_list function to handle various data structures and ensure consistent text formatting
📝 (LoopTemplate.json): Update the LoopComponent class description and method implementations for better clarity and maintainability
📝 (test_data_to_text_list.py): Add unit tests to cover different scenarios and edge cases for the data_to_text_list function

* [autofix.ci] apply automated fixes

* 📝 (langflow): Add noqa comments to ignore linting rule A005 for specific files in the project. Fix type annotations and improve error handling in data.py module. Add noqa comments to ignore linting rule A005 for specific files in the project.

*  (test_data_to_text_list.py): update parameter names in pytest.mark.parametrize to improve readability and maintainability

* 🐛 (data.py): refactor error message handling in data_to_text_list function to improve readability and maintainability

* [autofix.ci] apply automated fixes

* Update src/backend/base/langflow/helpers/data.py

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>

* ♻️ (data.py): refactor data_to_text_list function to simplify the logic and improve readability by removing unnecessary if conditions and updating the format_dict directly from data_obj.data.

*  (test_data.py): refactor test_data_to_text_list function to handle defaultdict behavior and improve test coverage

*  (loop-component.spec.ts): update test expectation to match the correct number of occurrences of "modified_value" in the output

*  (Memory Chatbot.spec.ts): add assertion to check if the concatenated text length is greater than 20 to ensure the chatbot response is meaningful

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
2025-02-24 20:27:34 +00:00
..
data fix: update documentation links for Custom Component to use the correct URL (#6145) 2025-02-06 22:39:05 +00:00
integration feat: add apify actors integration (#5862) 2025-02-19 19:10:26 +00:00
locust chore: Enhance Locust load testing and optimize database settings (#6265) 2025-02-17 14:26:36 +00:00
performance tests: Remove unnecessary benchmark markers from server init tests (#5806) 2025-01-20 16:43:46 +00:00
unit feat: Improve data handling and text formatting (loop fix) (#6771) 2025-02-24 20:27:34 +00:00
.test_durations chore: update test durations (#6778) 2025-02-24 14:01:40 -03:00
__init__.py chore: refactor and add components integration tests (#3607) 2024-09-02 15:21:47 +02:00
api_keys.py ref: Auto-fix ruff rules in tests (#4154) 2024-10-16 15:42:36 +00:00
base.py fix: make sure tests run async (#5842) 2025-01-21 08:16:33 -08:00
conftest.py fix: Enhance tests and update NVIDIA Ingest installation instructions (#6753) 2025-02-21 11:05:29 -03:00
constants.py chore: Update supported versions in tests constants (#5569) 2025-01-07 15:43:49 +00:00