[ 
https://issues.apache.org/jira/browse/BEAM-1081?focusedWorklogId=153967&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-153967
 ]

ASF GitHub Bot logged work on BEAM-1081:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 12/Oct/18 17:59
            Start Date: 12/Oct/18 17:59
    Worklog Time Spent: 10m 
      Work Description: pabloem commented on a change in pull request #6670: 
[BEAM-1081] Annotations custom message support and classes tests.
URL: https://github.com/apache/beam/pull/6670#discussion_r224868863
 
 

 ##########
 File path: sdks/python/apache_beam/utils/annotations_test.py
 ##########
 @@ -78,6 +131,29 @@ def fnc_test_deprecated_without_since_should_fail():
         fnc_test_deprecated_without_since_should_fail()
       assert not w
 
+<<<<<<< HEAD
+  def test_deprecated_without_since_custom_should_fail(self):
+    with warnings.catch_warnings(record=True) as w:
+      with self.assertRaises(TypeError):
+        @deprecated(custom_message='Test %since%')
+        def fnc_test_deprecated_without_since_custom_should_fail():
+          return 'lol'
+        fnc_test_deprecated_without_since_custom_should_fail()
+=======
+  def test_deprecated_without_since_should_fail_class(self):
+    with warnings.catch_warnings(record=True) as w:
+      with self.assertRaises(TypeError):
+
+        @deprecated()
+        class Class_test_deprecated_without_since_should_fail():
+          fooo = 'lol'
+          def foo(self):
+            return 'lol'
+        foo = Class_test_deprecated_without_since_should_fail()
+        foo.foo()
+>>>>>>> ae3ee47cf9e131cf66644532022178d559d9237d
 
 Review comment:
   merge trouble

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 153967)
    Time Spent: 20m  (was: 10m)

> annotations should support custom messages and classes
> ------------------------------------------------------
>
>                 Key: BEAM-1081
>                 URL: https://issues.apache.org/jira/browse/BEAM-1081
>             Project: Beam
>          Issue Type: Improvement
>          Components: sdk-py-core
>            Reporter: Ahmet Altay
>            Priority: Minor
>              Labels: newbie, starter
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> Update 
> https://github.com/apache/incubator-beam/blob/python-sdk/sdks/python/apache_beam/utils/annotations.py
>  to add 2 new features:
> 1. ability to customize message
> 2. ability to tag classes (not only functions)



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

Reply via email to