You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2020/06/08 00:12:43 UTC

[GitHub] [beam] FrozenFury commented on a change in pull request #11939: [BEAM-10197] Support typehints for Python's frozenset

FrozenFury commented on a change in pull request #11939:
URL: https://github.com/apache/beam/pull/11939#discussion_r436415259



##########
File path: sdks/python/apache_beam/typehints/typehints_test.py
##########
@@ -612,54 +613,70 @@ def test_match_type_variables(self):
                      hint.match_type_variables(typehints.Dict[int, str]))
 
 
-class SetHintTestCase(TypeHintTestCase):
+class BaseSetHintTest:

Review comment:
       Just pushed a fix - BaseSetHintTest is now a wrapper for a nested class that inherits from TypeHintTestCase (which inherits from TestCase), removing the multiple inheritance.
   
   I think BaseSetHintTest can't directly inherit from TypeHintTestCase because that would cause the unittest library to accidentally run the BaseSetHintTest tests which cannot be run without first being instantiated by the children classes (SetHintTestCase, FrozenSetHintTestCase). The nested class solves this issue. See [here](https://stackoverflow.com/a/25695512).




----------------------------------------------------------------
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.

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