diff --git a/test.js b/test.js index a4bb992b..34e8b626 100644 --- a/test.js +++ b/test.js @@ -1,3 +1,4 @@ +const performance = require('perf_hooks').performance; const crossSpawn = require('cross-spawn'); const glob = require('glob-all'); const JSZip = require('jszip'); @@ -108,6 +109,7 @@ const testFilter = (() => { const test = (desc, func, opts = {}) => testFilter(desc)(desc, opts, async (t) => { + const startTime = performance.now(); setup(); let ended = false; try { @@ -123,6 +125,8 @@ const test = (desc, func, opts = {}) => } if (!ended) t.end(); } + const endTime = performance.now(); + console.log(`Execution time for "${desc}": ${endTime - startTime} ms`); }); const availablePythons = (() => { @@ -1373,7 +1377,8 @@ test( { skip: !canUseDocker() || process.platform === 'win32' } ); -test('py3.7 uses download cache by default option', +test( + 'py3.7 uses download cache by default option', async (t) => { process.chdir('tests/base'); const path = npm(['pack', '../..']); @@ -1381,7 +1386,7 @@ test('py3.7 uses download cache by default option', sls(['package'], { env: {} }); const cachepath = getUserCachePath(); t.true( - pathExistsSync(`${cachepath}${sep}downloadCacheslspyc${sep}http`), + pathExistsSync(`${cachepath}${sep}downloadCacheslspyc${sep}http`), 'cache directory exists' ); t.end(); @@ -1389,7 +1394,8 @@ test('py3.7 uses download cache by default option', { skip: true } ); -test('py3.7 uses download cache by default', +test( + 'py3.7 uses download cache by default', async (t) => { process.chdir('tests/base'); const path = npm(['pack', '../..']); @@ -1441,7 +1447,8 @@ test( { skip: true } ); -test('py3.7 uses static and download cache', +test( + 'py3.7 uses static and download cache', async (t) => { process.chdir('tests/base'); const path = npm(['pack', '../..']); diff --git a/tests/poetry/pyproject.toml b/tests/poetry/pyproject.toml index b813968a..70574bc4 100644 --- a/tests/poetry/pyproject.toml +++ b/tests/poetry/pyproject.toml @@ -5,13 +5,14 @@ description = "" authors = ["Your Name <you@example.com>"] [tool.poetry.dependencies] -python = "^3.6" -Flask = "^1.0" +python = "^3.7" +Flask = "2.0" bottle = {git = "https://git@github.com/bottlepy/bottle.git", tag = "0.12.16"} -boto3 = "^1.9" +boto3 = "1.29.6" [tool.poetry.dev-dependencies] [build-system] -requires = ["poetry>=0.12"] +requires = ["poetry"] build-backend = "poetry.masonry.api" + diff --git a/tests/poetry_individually/module1/pyproject.toml b/tests/poetry_individually/module1/pyproject.toml index b813968a..896b48e7 100644 --- a/tests/poetry_individually/module1/pyproject.toml +++ b/tests/poetry_individually/module1/pyproject.toml @@ -5,13 +5,13 @@ description = "" authors = ["Your Name <you@example.com>"] [tool.poetry.dependencies] -python = "^3.6" -Flask = "^1.0" +python = "^3.7" +Flask = "2.0" bottle = {git = "https://git@github.com/bottlepy/bottle.git", tag = "0.12.16"} -boto3 = "^1.9" +boto3 = "1.29.6" [tool.poetry.dev-dependencies] [build-system] -requires = ["poetry>=0.12"] +requires = ["poetry"] build-backend = "poetry.masonry.api" diff --git a/tests/poetry_packages/pyproject.toml b/tests/poetry_packages/pyproject.toml index 7bbe30bf..0f9fc705 100644 --- a/tests/poetry_packages/pyproject.toml +++ b/tests/poetry_packages/pyproject.toml @@ -5,14 +5,14 @@ description = "" authors = ["Your Name <you@example.com>"] [tool.poetry.dependencies] -python = "^3.6" -Flask = "^1.0" +python = "^3.7" +Flask = "2.0" [tool.poetry.group.custom1.dependencies] bottle = {git = "https://git@github.com/bottlepy/bottle.git", tag = "0.12.16"} [tool.poetry.group.custom2.dependencies] -boto3 = "^1.9" +boto3 = "1.29.6" [build-system] requires = ["poetry-core"]