Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix several failing tests #145

Merged
merged 3 commits into from
Sep 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading