You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2021/07/02 11:29:23 UTC

[GitHub] [arrow] kszucs commented on a change in pull request #10641: ARROW-13236: [Python] Include options class name in repr

kszucs commented on a change in pull request #10641:
URL: https://github.com/apache/arrow/pull/10641#discussion_r662944354



##########
File path: python/pyarrow/tests/test_compute.py
##########
@@ -137,14 +137,17 @@ def test_option_class_equality():
                 pytest.fail(f"Options class is not tested: {cls}")
     for option in options:
         assert option == option
-        assert repr(option)
+        assert repr(option).startswith(option.__class__.__name__)
         buf = option.serialize()
         deserialized = pc.FunctionOptions.deserialize(buf)
         assert option == deserialized
         assert repr(option) == repr(deserialized)
     for option1, option2 in zip(options, options[1:]):
         assert option1 != option2
 
+    assert repr(pc.IndexOptions(pa.scalar(1))) == "IndexOptions{value=int64:1}"
+    assert repr(pc.ArraySortOptions()) == "ArraySortOptions{order=Ascending}"

Review comment:
       I'd prefer `(..)` as well.




-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org