diff options
author | Giampaolo Rodola <g.rodola@gmail.com> | 2015-07-15 13:41:11 +0200 |
---|---|---|
committer | Giampaolo Rodola <g.rodola@gmail.com> | 2015-07-15 13:41:11 +0200 |
commit | e434c7d26551377c1bf206eff52a66bb9a0778c3 (patch) | |
tree | 6c7bf66ea65e236d3eeebd1ac84f8f0ba184e5d8 | |
parent | ac8c95745ff5c6adfa96af70852b237f776883aa (diff) | |
download | psutil-e434c7d26551377c1bf206eff52a66bb9a0778c3.tar.gz |
fix #656: fix __all__ + add test for 'from psutil import *'
-rw-r--r-- | psutil/__init__.py | 2 | ||||
-rw-r--r-- | test/test_psutil.py | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/psutil/__init__.py b/psutil/__init__.py index 5586eaac..3e4d0462 100644 --- a/psutil/__init__.py +++ b/psutil/__init__.py @@ -136,7 +136,7 @@ __all__ = [ "Error", "NoSuchProcess", "ZombieProcess", "AccessDenied", "TimeoutExpired", # constants - "version_info", "__3n__", + "version_info", "__version__", "STATUS_RUNNING", "STATUS_IDLE", "STATUS_SLEEPING", "STATUS_DISK_SLEEP", "STATUS_STOPPED", "STATUS_TRACING_STOP", "STATUS_ZOMBIE", "STATUS_DEAD", "STATUS_WAKING", "STATUS_LOCKED", "STATUS_WAITING", "STATUS_LOCKED", diff --git a/test/test_psutil.py b/test/test_psutil.py index 8d8165f4..73779cc3 100644 --- a/test/test_psutil.py +++ b/test/test_psutil.py @@ -2752,6 +2752,9 @@ class TestMisc(unittest.TestCase): if (fun.__doc__ is not None and 'deprecated' not in fun.__doc__.lower()): self.fail('%r not in psutil.__all__' % name) + # import 'start' will break if __all__ is inconsistent, see: + # https://github.com/giampaolo/psutil/issues/656 + from psutil import * # NOQA def test_memoize(self): from psutil._common import memoize |