mirror of
https://github.com/wassname/catalyst.git
synced 2026-10-05 12:40:08 +08:00
ENH: Include sharedoc function
This commit is contained in:
1 parent
2d56d253fa
commit
ff1c673a9d
3 files changed
+41
-1
No files matched your search
@@ -0,0 +1,21 @@
|
||||
from zipline.testing import ZiplineTestCase
|
||||
from zipline.utils.sharedoc import copydoc
|
||||
|
||||
|
||||
class TestSharedoc(ZiplineTestCase):
|
||||
|
||||
def test_copydoc(self):
|
||||
def original_docstring_function():
|
||||
"""
|
||||
My docstring brings the boys to the yard.
|
||||
"""
|
||||
pass
|
||||
|
||||
@copydoc(original_docstring_function)
|
||||
def copied_docstring_function():
|
||||
pass
|
||||
|
||||
self.assertEqual(
|
||||
original_docstring_function.__doc__,
|
||||
copied_docstring_function.__doc__
|
||||
)
|
||||
Reference in new issue
Block a user