beam-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Valentyn Tymofieiev (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (BEAM-5620) Some tests use assertItemsEqual method, not available in Python 3
Date Fri, 05 Oct 2018 05:57:00 GMT

    [ https://issues.apache.org/jira/browse/BEAM-5620?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16639308#comment-16639308
] 

Valentyn Tymofieiev commented on BEAM-5620:
-------------------------------------------

It's possible although in this case some of our test classes will inherit from unittest.TestCase,
while others will inherit from something like apache_beam.testing.util.TestCase, which may
cause confusion. Everytime someone reading the code would see the latter, they may be wondering
why do we have two classes, and which one needs to be used. 

While if we have a patch in an individual class, the goal is self-explanatory, but I agree
that this is not a perfect solution.

Another possibility is to use six.assertCountEqual, but according to the approach we have
chosen in Beam [1] , we'd like to use native idioms of Python 3 when possible. This is why
we eliminated the usages of six, and removed this dependency. 

[1] https://docs.google.com/document/d/1xDG0MWVlDKDPu_IW9gtMvxi2S9I0GB0VDTkPhjXT0nE

> Some tests use assertItemsEqual method, not available in Python 3
> -----------------------------------------------------------------
>
>                 Key: BEAM-5620
>                 URL: https://issues.apache.org/jira/browse/BEAM-5620
>             Project: Beam
>          Issue Type: Sub-task
>          Components: sdk-py-core
>            Reporter: Valentyn Tymofieiev
>            Priority: Major
>
> See: https://github.com/apache/beam/search?q=assertItemsEqual&unscoped_q=assertItemsEqual



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message