Skip to content

Commit

Permalink
Rename unitest to unittest - Related to #2757
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolargo committed May 7, 2024
1 parent e8563a0 commit 8e8d4ce
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 1,054 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
- name: Unitary tests
run: |
python ./unitest.py
python ./unittest.py
# Error appear with h11, not related to Glances
# Should be tested if correction is done
Expand Down Expand Up @@ -80,7 +80,7 @@ jobs:

# - name: Unitary tests
# run: |
# python ./unitest.py
# python ./unittest.py

test-macos:

Expand All @@ -107,7 +107,7 @@ jobs:
- name: Unitary tests
run: |
python ./unitest.py
python ./unittest.py
# Error when trying to implement #2749
# pkg: No packages available to install matching 'py-pip' have been found in the repositories
Expand All @@ -128,4 +128,4 @@ jobs:
# run: |
# set -e -x
# python3 -m pip install --user -r requirements.txt
# python ./unitest.py
# python ./unittest.py
18 changes: 9 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -63,25 +63,25 @@ venv-dev-upgrade: ## Upgrade Python 3 dev dependencies
# ===================================================================

test: ## Run unit tests
./venv/bin/python ./unitest.py
./venv/bin/python ./unitest-restful.py
./venv/bin/python ./unitest-xmlrpc.py
./venv/bin/python ./unittest.py
./venv/bin/python ./unittest-restful.py
./venv/bin/python ./unittest-xmlrpc.py
./venv-dev/bin/python -m black ./glances --check --exclude outputs/static

test-with-upgrade: venv-upgrade venv-dev-upgrade ## Upgrade deps and run unit tests
./venv/bin/python ./unitest.py
./venv/bin/python ./unitest-restful.py
./venv/bin/python ./unitest-xmlrpc.py
./venv/bin/python ./unittest.py
./venv/bin/python ./unittest-restful.py
./venv/bin/python ./unittest-xmlrpc.py
./venv/bin-dev/python -m black ./glances --check --exclude outputs/static

test-min: ## Run unit tests in minimal environment
./venv-min/bin/python ./unitest.py
./venv-min/bin/python ./unittest.py

test-min-with-upgrade: venv-min-upgrade ## Upgrade deps and run unit tests in minimal environment
./venv-min/bin/python ./unitest.py
./venv-min/bin/python ./unittest.py

test-restful-api: ## Run unit tests of the RESTful API
./venv/bin/python ./unitest-restful.py
./venv/bin/python ./unittest-restful.py

# ===================================================================
# Linters, profilers and cyber security
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def finalize_options(self):
def run(self):
import subprocess
import sys
for t in glob.glob('unitest.py'):
for t in glob.glob('unittest.py'):
ret = subprocess.call([sys.executable, t]) != 0
if ret != 0:
raise SystemExit(ret)
Expand All @@ -120,7 +120,7 @@ def run(self):
include_package_data=True,
data_files=get_data_files(),
cmdclass={'test': tests},
test_suite="unitest.py",
test_suite="unittest.py",
entry_points={"console_scripts": ["glances=glances:main"]},
classifiers=[
'Development Status :: 5 - Production/Stable',
Expand Down
6 changes: 3 additions & 3 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ deps =
jinja2
requests
commands =
python unitest.py
; python unitest-restful.py
; python unitest-xmlrpc.py
python unittest.py
; python unittest-restful.py
; python unittest-xmlrpc.py
;flake8 --exclude=build,.tox,.git
3 changes: 0 additions & 3 deletions unitest-all.sh

This file was deleted.

286 changes: 0 additions & 286 deletions unitest-restful.py

This file was deleted.

Loading

0 comments on commit 8e8d4ce

Please sign in to comment.