Skip to content

Commit 0297c08

Browse files
committed
Unit test fixes.
Signed-off-by: Thomas Neidhart <thomas.neidhart@gmail.com>
1 parent a807c15 commit 0297c08

10 files changed

Lines changed: 8811 additions & 98 deletions

.github/workflows/ci.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
on:
2+
push:
3+
branches: [main]
4+
pull_request:
5+
workflow_dispatch:
6+
7+
jobs:
8+
build:
9+
strategy:
10+
fail-fast: false
11+
matrix:
12+
python-version: [ "3.7", "3.8", "3.9", "3.10", "3.11" ]
13+
os: [ ubuntu-latest, macos-latest ]
14+
runs-on: ${{ matrix.os }}
15+
steps:
16+
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
17+
- uses: actions/setup-python@65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236 # v4.7.1
18+
with:
19+
python-version: ${{ matrix.python-version }}
20+
- name: Install dependencies
21+
run: ./configure --dev
22+
- name: Run tests
23+
run: make test

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,11 @@ valid: isort black
3434
check:
3535
@echo "-> Run pycodestyle (PEP8) validation"
3636
@${ACTIVATE} pycodestyle --max-line-length=110 \
37-
--exclude=.eggs,etc/scripts,src/_packagedcode,venv/,lib/,thirdparty/,docs/,.cache/ .
37+
--exclude=.eggs,etc/scripts,src/_packagedcode,venv/,lib/,thirdparty/,docs/,.cache/,tests/.cache/,./src/python_inspector/.cache/ .
3838
@echo "-> Run isort imports ordering validation"
39-
@${ACTIVATE} isort --sl --check-only -l 100 setup.py src tests --skip-glob "*/_packagedcode/*"
39+
@${ACTIVATE} isort --sl --check-only -l 100 setup.py src tests --skip-glob "*/_packagedcode/*" --extend-skip-glob="*/.cache/*"
4040
@echo "-> Run black validation"
41-
@${ACTIVATE} black --check -l 100 src tests setup.py --exclude "_packagedcode/.*"
41+
@${ACTIVATE} black --check -l 100 src tests setup.py --exclude "_packagedcode/.*|.cache/.*"
4242

4343
clean:
4444
@echo "-> Clean the Python env"

tests/data/azure-devops.req-310-expected.json

Lines changed: 44 additions & 42 deletions
Large diffs are not rendered by default.

tests/data/azure-devops.req-38-expected.json

Lines changed: 44 additions & 42 deletions
Large diffs are not rendered by default.

tests/data/error-requirements.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1-
pytest
1+
pytest==7.4.3
2+
exceptiongroup==1.1.3
23
noexistingpacjagee

tests/data/example-requirements-ignore-errors-expected.json

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,33 @@
5050
"extra_data": {},
5151
"dependencies": [
5252
{
53-
"purl": "pkg:pypi/pytest",
54-
"extracted_requirement": "pytest",
53+
"purl": "pkg:pypi/pytest@7.4.3",
54+
"extracted_requirement": "pytest==7.4.3",
5555
"scope": "install",
5656
"is_runtime": true,
5757
"is_optional": false,
58-
"is_resolved": false,
58+
"is_resolved": true,
59+
"resolved_package": {},
60+
"extra_data": {
61+
"is_editable": false,
62+
"link": null,
63+
"hash_options": [],
64+
"is_constraint": false,
65+
"is_archive": null,
66+
"is_wheel": false,
67+
"is_url": null,
68+
"is_vcs_url": null,
69+
"is_name_at_url": false,
70+
"is_local_path": null
71+
}
72+
},
73+
{
74+
"purl": "pkg:pypi/exceptiongroup@1.1.3",
75+
"extracted_requirement": "exceptiongroup==1.1.3",
76+
"scope": "install",
77+
"is_runtime": true,
78+
"is_optional": false,
79+
"is_resolved": true,
5980
"resolved_package": {},
6081
"extra_data": {
6182
"is_editable": false,

0 commit comments

Comments
 (0)