Skip to content

Commit

Permalink
Ruff
Browse files Browse the repository at this point in the history
  • Loading branch information
stellasia committed Jan 6, 2025
1 parent ea0d0da commit decd3b8
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions tests/unit/utils/test_prettifyer.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from unittest.mock import call, patch, Mock
from unittest.mock import Mock, call, patch

from neo4j_graphrag.utils.logging import Prettifyer, prettify

Expand Down Expand Up @@ -101,20 +101,18 @@ def test_prettifyer_dict_nested() -> None:


def test_prettify_function() -> None:
assert prettify({
"key": {
"key0.1": "ab" * 200,
"key0.2": ["a"] * 10,
"key0.3": {
"key0.3.1": "a short strng"
assert prettify(
{
"key": {
"key0.1": "ab" * 200,
"key0.2": ["a"] * 10,
"key0.3": {"key0.3.1": "a short strng"},
}
}
}) == {
) == {
"key": {
"key0.1": "ab" * 100 + f"... (200 chars)",
"key0.2": ["a"] * 5 + ["... (5 items)"],
"key0.3": {
"key0.3.1": "a short strng"
}
"key0.3": {"key0.3.1": "a short strng"},
}
}

0 comments on commit decd3b8

Please sign in to comment.