Skip to content

Commit

Permalink
test skeleton
Browse files Browse the repository at this point in the history
  • Loading branch information
giampaolo committed Feb 25, 2025
1 parent ce01113 commit e05cf50
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 0 deletions.
3 changes: 3 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,8 @@ include psutil/arch/windows/proc_info.c
include psutil/arch/windows/proc_info.h
include psutil/arch/windows/proc_utils.c
include psutil/arch/windows/proc_utils.h
include psutil/arch/windows/proc_watcher.c
include psutil/arch/windows/proc_watcher.h
include psutil/arch/windows/security.c
include psutil/arch/windows/security.h
include psutil/arch/windows/sensors.c
Expand All @@ -165,6 +167,7 @@ include psutil/tests/test_osx.py
include psutil/tests/test_posix.py
include psutil/tests/test_process.py
include psutil/tests/test_process_all.py
include psutil/tests/test_process_watcher.py
include psutil/tests/test_scripts.py
include psutil/tests/test_sunos.py
include psutil/tests/test_system.py
Expand Down
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,10 @@ test-process-all: ## Run tests which iterate over all process PIDs.
${MAKE} build
$(PYTHON_ENV_VARS) $(PYTHON) -m pytest $(PYTEST_ARGS) $(ARGS) psutil/tests/test_process_all.py

test-process-watcher: ## Run ProcessWatcher tests.
${MAKE} build
$(PYTHON_ENV_VARS) $(PYTHON) -m pytest $(PYTEST_ARGS) $(ARGS) psutil/tests/test_process_watcher.py

test-system: ## Run system-related API tests.
${MAKE} build
$(PYTHON_ENV_VARS) $(PYTHON) -m pytest $(PYTEST_ARGS) $(ARGS) psutil/tests/test_system.py
Expand Down
22 changes: 22 additions & 0 deletions psutil/tests/test_process_watcher.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/usr/bin/env python3

# Copyright (c) 2009, Giampaolo Rodola'. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

"""Tests for psutil.ProcessWatcher class."""

import psutil
from psutil.tests import PsutilTestCase


class TestProcessWatcher(PsutilTestCase):
def setUp(self):
self.pw = psutil.ProcessWatcher()

def tearDown(self):
self.pw.close()

def test_it(self):
pass
# proc = self.spawn_testproc()

0 comments on commit e05cf50

Please sign in to comment.