-
-
Notifications
You must be signed in to change notification settings - Fork 562
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Varsha U N <varshamaddur2006@gmail.com>
- Loading branch information
Showing
5 changed files
with
66 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
...ode/data/pypi/pyproject-toml/standard/python-private-package-pyproject.toml-expected.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"name": "PrivatePackage", | ||
"version": "0.1.0", | ||
"description": "A private package for testing the 'Private :: Do Not Upload' classifier.", | ||
"license": "LICENSE.txt", | ||
"classifiers": [ | ||
"Development Status :: 1 - Planning", | ||
"Programming Language :: Python :: 3", | ||
"Private :: Do Not Upload" | ||
], | ||
"requires-python": ">=3.7", | ||
"dependencies": [ | ||
"requests>=2.25.1" | ||
] | ||
|
||
} |
22 changes: 22 additions & 0 deletions
22
tests/packagedcode/data/pypi/pyproject-toml/standard/python-private-package/pyproject.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
[build-system] | ||
requires = ["setuptools", "wheel"] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[project] | ||
name = "PrivatePackage" | ||
version = "0.1.0" | ||
description = "A private package for testing the 'Private :: Do Not Upload' classifier." | ||
readme = "README.md" | ||
license = {file = "LICENSE.txt"} | ||
classifiers = [ | ||
"Development Status :: 1 - Planning", | ||
"Programming Language :: Python :: 3", | ||
"Private :: Do Not Upload" | ||
] | ||
requires-python = ">=3.7" | ||
dependencies = [ | ||
"requests>=2.25.1", | ||
] | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import json | ||
import toml | ||
import os | ||
|
||
def test_parse_pyproject_toml(): | ||
|
||
toml_path = "tests/packagedcode/data/pypi/pyproject-toml/standard/python_private_package/pyproject.toml" | ||
|
||
expected_json_path = "tests/packagedcode/data/pypi/pyproject-toml/standard/python_private_package/pyproject.toml-expected.json" | ||
|
||
|
||
with open(toml_path, 'r') as file: | ||
toml_data = toml.load(file) | ||
|
||
|
||
with open(expected_json_path, 'r') as file: | ||
expected_data = json.load(file) | ||
|
||
|
||
assert toml_data == expected_data, f"Parsed data does not match the expected data.\nParsed: {toml_data}\nExpected: {expected_data}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters