Skip to content

Commit

Permalink
Merge pull request #145 from fviernau/misc-test-fixes
Browse files Browse the repository at this point in the history
Fix several failing tests
  • Loading branch information
TG1999 authored Sep 25, 2023
2 parents 1d98803 + 8eacb36 commit 691c55e
Show file tree
Hide file tree
Showing 22 changed files with 476 additions and 486 deletions.
2 changes: 1 addition & 1 deletion src/python_inspector/resolution.py
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ def get_requirements_from_python_manifest(
else:
# Do not raise exception here as we may have a setup.py that does not
# have any dependencies.
with (open(setup_py_location)) as sf:
with open(setup_py_location) as sf:
file_contents = sf.read()
node = ast.parse(file_contents)
setup_fct = [
Expand Down
238 changes: 122 additions & 116 deletions tests/data/azure-devops.req-310-expected.json

Large diffs are not rendered by default.

238 changes: 122 additions & 116 deletions tests/data/azure-devops.req-38-expected.json

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"tool_homepageurl": "https://github.com/nexB/python-inspector",
"tool_version": "0.9.8",
"options": [
"--requirement /home/tg1999/Desktop/example/tools/python-inspector/tests/data/environment-marker-test-requirements.txt",
"--requirement /home/frank/sources/github/nexB/python-inspector/tests/data/environment-marker-test-requirements.txt",
"--index-url https://pypi.org/simple",
"--python-version 37",
"--operating-system linux",
Expand All @@ -17,7 +17,7 @@
"files": [
{
"type": "file",
"path": "/home/tg1999/Desktop/example/tools/python-inspector/tests/data/environment-marker-test-requirements.txt",
"path": "/home/frank/sources/github/nexB/python-inspector/tests/data/environment-marker-test-requirements.txt",
"package_data": [
{
"type": "pypi",
Expand Down
4 changes: 2 additions & 2 deletions tests/data/frozen-requirements.txt-expected.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"tool_homepageurl": "https://github.com/nexB/python-inspector",
"tool_version": "0.9.8",
"options": [
"--requirement /home/tg1999/Desktop/example/tools/python-inspector/tests/data/frozen-requirements.txt",
"--requirement /home/frank/sources/github/nexB/python-inspector/tests/data/frozen-requirements.txt",
"--index-url https://pypi.org/simple",
"--python-version 38",
"--operating-system linux",
Expand All @@ -17,7 +17,7 @@
"files": [
{
"type": "file",
"path": "/home/tg1999/Desktop/example/tools/python-inspector/tests/data/frozen-requirements.txt",
"path": "/home/frank/sources/github/nexB/python-inspector/tests/data/frozen-requirements.txt",
"package_data": [
{
"type": "pypi",
Expand Down
46 changes: 24 additions & 22 deletions tests/data/insecure-setup-2/setup.py-expected.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion tests/data/insecure-setup/setup.py-expected.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"files": [
{
"type": "file",
"path": "/home/tg1999/Desktop/example/tools/python-inspector/tests/data/insecure-setup/setup.py",
"path": "/home/frank/sources/github/nexB/python-inspector/tests/data/insecure-setup/setup.py",
"package_data": [
{
"type": "pypi",
Expand Down
4 changes: 2 additions & 2 deletions tests/data/pdt-requirements.txt-expected.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"tool_homepageurl": "https://github.com/nexB/python-inspector",
"tool_version": "0.9.8",
"options": [
"--requirement /home/tg1999/Desktop/example/tools/python-inspector/tests/data/pdt-requirements.txt",
"--requirement /home/frank/sources/github/nexB/python-inspector/tests/data/pdt-requirements.txt",
"--index-url https://pypi.org/simple",
"--python-version 38",
"--operating-system linux",
Expand All @@ -17,7 +17,7 @@
"files": [
{
"type": "file",
"path": "/home/tg1999/Desktop/example/tools/python-inspector/tests/data/pdt-requirements.txt",
"path": "/home/frank/sources/github/nexB/python-inspector/tests/data/pdt-requirements.txt",
"package_data": [
{
"type": "pypi",
Expand Down
4 changes: 2 additions & 2 deletions tests/data/pinned-pdt-requirements.txt-expected.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"tool_homepageurl": "https://github.com/nexB/python-inspector",
"tool_version": "0.9.8",
"options": [
"--requirement /home/tg1999/Desktop/example/tools/python-inspector/tests/data/pinned-pdt-requirements.txt",
"--requirement /home/frank/sources/github/nexB/python-inspector/tests/data/pinned-pdt-requirements.txt",
"--index-url https://pypi.org/simple",
"--python-version 38",
"--operating-system linux",
Expand All @@ -17,7 +17,7 @@
"files": [
{
"type": "file",
"path": "/home/tg1999/Desktop/example/tools/python-inspector/tests/data/pinned-pdt-requirements.txt",
"path": "/home/frank/sources/github/nexB/python-inspector/tests/data/pinned-pdt-requirements.txt",
"package_data": [
{
"type": "pypi",
Expand Down
4 changes: 2 additions & 2 deletions tests/data/pinned-requirements.txt-expected.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"tool_homepageurl": "https://github.com/nexB/python-inspector",
"tool_version": "0.9.8",
"options": [
"--requirement /home/tg1999/Desktop/example/tools/python-inspector/tests/data/pinned-requirements.txt",
"--requirement /home/frank/sources/github/nexB/python-inspector/tests/data/pinned-requirements.txt",
"--index-url https://pypi.org/simple",
"--python-version 38",
"--operating-system linux",
Expand All @@ -17,7 +17,7 @@
"files": [
{
"type": "file",
"path": "/home/tg1999/Desktop/example/tools/python-inspector/tests/data/pinned-requirements.txt",
"path": "/home/frank/sources/github/nexB/python-inspector/tests/data/pinned-requirements.txt",
"package_data": [
{
"type": "pypi",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"files": [
{
"type": "file",
"path": "/home/tg1999/Desktop/example/tools/python-inspector/tests/data/setup/no-direct-dependencies-setup.py",
"path": "/home/frank/sources/github/nexB/python-inspector/tests/data/setup/no-direct-dependencies-setup.py",
"package_data": [
{
"type": "pypi",
Expand Down
2 changes: 1 addition & 1 deletion tests/data/setup/simple-setup.py-expected.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"files": [
{
"type": "file",
"path": "/home/tg1999/Desktop/example/tools/python-inspector/tests/data/setup/simple-setup.py",
"path": "/home/frank/sources/github/nexB/python-inspector/tests/data/setup/simple-setup.py",
"package_data": [
{
"type": "pypi",
Expand Down
2 changes: 1 addition & 1 deletion tests/data/setup/spdx-setup.py-expected.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"files": [
{
"type": "file",
"path": "/home/tg1999/Desktop/example/tools/python-inspector/tests/data/setup/spdx-setup.py",
"path": "/home/frank/sources/github/nexB/python-inspector/tests/data/setup/spdx-setup.py",
"package_data": [
{
"type": "pypi",
Expand Down
Loading

0 comments on commit 691c55e

Please sign in to comment.