mirror of https://github.com/nicolargo/glances
Add Python 3.12 support in UnitTest
parent
f9f73f739c
commit
17fb3c8d60
|
@ -10,7 +10,7 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
python-version: ["3.8", "3.9", "3.10", "3.11"]
|
||||
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
|
||||
|
||||
steps:
|
||||
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "static",
|
||||
"dependencies": {
|
||||
"bootstrap": "^3.4.1",
|
||||
"favico.js": "^0.3.10",
|
||||
|
@ -3953,9 +3954,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/postcss": {
|
||||
"version": "8.4.23",
|
||||
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.23.tgz",
|
||||
"integrity": "sha512-bQ3qMcpF6A/YjR55xtoTr0jGOlnPOKAIMdOWiv0EIT6HVPEaJiJB4NLljSbiHoC2RX7DN5Uvjtpbg1NPdwv1oA==",
|
||||
"version": "8.4.31",
|
||||
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.31.tgz",
|
||||
"integrity": "sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ==",
|
||||
"funding": [
|
||||
{
|
||||
"type": "opencollective",
|
||||
|
@ -8755,9 +8756,9 @@
|
|||
}
|
||||
},
|
||||
"postcss": {
|
||||
"version": "8.4.23",
|
||||
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.23.tgz",
|
||||
"integrity": "sha512-bQ3qMcpF6A/YjR55xtoTr0jGOlnPOKAIMdOWiv0EIT6HVPEaJiJB4NLljSbiHoC2RX7DN5Uvjtpbg1NPdwv1oA==",
|
||||
"version": "8.4.31",
|
||||
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.31.tgz",
|
||||
"integrity": "sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ==",
|
||||
"requires": {
|
||||
"nanoid": "^3.3.6",
|
||||
"picocolors": "^1.0.0",
|
||||
|
|
File diff suppressed because one or more lines are too long
1
setup.py
1
setup.py
|
@ -134,6 +134,7 @@ setup(
|
|||
'Programming Language :: Python :: 3.9',
|
||||
'Programming Language :: Python :: 3.10',
|
||||
'Programming Language :: Python :: 3.11',
|
||||
'Programming Language :: Python :: 3.12',
|
||||
'Topic :: System :: Monitoring'
|
||||
]
|
||||
)
|
||||
|
|
18
tox.ini
18
tox.ini
|
@ -5,16 +5,24 @@
|
|||
# tox
|
||||
|
||||
[tox]
|
||||
envlist = py39
|
||||
envlist =
|
||||
py38
|
||||
py39
|
||||
py310
|
||||
py311
|
||||
py312
|
||||
|
||||
[testenv]
|
||||
deps =
|
||||
flake8
|
||||
requests
|
||||
psutil
|
||||
defusedxml
|
||||
packaging
|
||||
ujson
|
||||
bottle
|
||||
requests
|
||||
commands =
|
||||
python unitest.py
|
||||
python unitest-restful.py
|
||||
python unitest-xmlrpc.py
|
||||
#flake8 --exclude=build,.tox,.git
|
||||
; python unitest-restful.py
|
||||
; python unitest-xmlrpc.py
|
||||
;flake8 --exclude=build,.tox,.git
|
||||
|
|
11
unitest.py
11
unitest.py
|
@ -397,15 +397,18 @@ class TestGlances(unittest.TestCase):
|
|||
def test_100_secure(self):
|
||||
"""Test secure functions"""
|
||||
print('INFO: [TEST_100] Secure functions')
|
||||
|
||||
if WINDOWS:
|
||||
self.assertEqual(secure_popen('echo TEST'), 'TEST\r\n')
|
||||
self.assertEqual(secure_popen('echo TEST1 && echo TEST2'), 'TEST1\r\nTEST2\r\n')
|
||||
self.assertIn(secure_popen('echo TEST'), ['TEST\n',
|
||||
'TEST\r\n'])
|
||||
self.assertIn(secure_popen('echo TEST1 && echo TEST2'), ['TEST1\nTEST2\n',
|
||||
'TEST1\r\nTEST2\r\n'])
|
||||
else:
|
||||
self.assertEqual(secure_popen('echo -n TEST'), 'TEST')
|
||||
self.assertEqual(secure_popen('echo -n TEST1 && echo -n TEST2'), 'TEST1TEST2')
|
||||
# Make the test failed on Github (AssertionError: '' != 'FOO\n')
|
||||
# but not on my localLinux computer...
|
||||
#self.assertEqual(secure_popen('echo FOO | grep FOO'), 'FOO\n')
|
||||
self.assertEqual(secure_popen('echo -n TEST1 && echo -n TEST2'), 'TEST1TEST2')
|
||||
# self.assertEqual(secure_popen('echo FOO | grep FOO'), 'FOO\n')
|
||||
|
||||
def test_200_memory_leak(self):
|
||||
"""Memory leak check"""
|
||||
|
|
Loading…
Reference in New Issue