From: Karl O. Pinc Date: Sat, 28 Dec 2019 21:37:22 +0000 (-0600) Subject: Test to ensure that this pgwui component is autoconfigured X-Git-Url: https://papio.biology.duke.edu/gitweb/?a=commitdiff_plain;h=8999f926972e6b6bbabb12424e5b21c545ceec48;p=pgwui_logout Test to ensure that this pgwui component is autoconfigured --- diff --git a/setup.py b/setup.py index 8209db4..08f14bc 100644 --- a/setup.py +++ b/setup.py @@ -165,9 +165,7 @@ setup( # To provide executable scripts, use entry points in preference to the # "scripts" keyword. Entry points provide cross-platform support and allow # pip to create the appropriate form of executable for the target platform. - # entry_points={ - # 'console_scripts': [ - # 'sample=sample:main', - # ], - # }, + # + # Setup an entry point to support PGWUI autoconfigure discovery. + entry_points={'pgwui.components': '.pgwui_logout = pgwui_logout'} ) diff --git a/tests/test___init__.py b/tests/test___init__.py index a7af24b..493f51b 100644 --- a/tests/test___init__.py +++ b/tests/test___init__.py @@ -1,4 +1,4 @@ -# Copyright (C) 2018 The Meme Factory, Inc. http://www.meme.com/ +# Copyright (C) 2018, 2019 The Meme Factory, Inc. http://www.meme.com/ # This file is part of PGWUI_Logout. # @@ -28,6 +28,14 @@ import pgwui_logout.__init__ as pgwui_logout_init pytest_plugins = ("pgwui",) +# Module packaging test + +def test_pgwui_upload_is_pgwui_component(pgwui_component_entry_point): + '''Ensure that pgwui_upload is a pgwui.component entry point + ''' + assert pgwui_component_entry_point('pgwui_logout') is True + + # Functional tests # includeme()