Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 9cc0712

Browse files
committed
Test directly with pip show.
Also move it into the regular test suite.
1 parent d4ec33d commit 9cc0712

7 files changed

Lines changed: 8 additions & 36 deletions

File tree

.github/workflows/ci.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,6 @@ jobs:
7575
toxenv: py38-tests
7676
- name: 3.8
7777
toxenv: py38-tests_nongpl
78-
- name: 3.8
79-
toxenv: check-package-license-file
8078
exclude:
8179
# Building on Windows isn't supported, and 3.5/PyPy on Windows
8280
# seem to fail with silent obscure errors.

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,3 @@ _static
33
_templates
44

55
TODO
6-
license_report.json
File renamed without changes.

jsonschema/tests/test_cli.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,13 @@ def test_unsuccessful_validation_multiple_instances(self):
142142
self.assertEqual(stderr.getvalue(), "1 - 9\t1 - 8\t2 - 7\t")
143143
self.assertEqual(exit_code, 1)
144144

145+
def test_license(self):
146+
output = subprocess.check_output(
147+
[sys.executable, "-m", "pip", "show", "jsonschema"],
148+
stderr=subprocess.STDOUT,
149+
)
150+
self.assertIn("License: MIT\n", output)
151+
145152
def test_version(self):
146153
version = subprocess.check_output(
147154
[sys.executable, "-m", "jsonschema", "--version"],

setup.cfg

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@ long_description = file: README.rst
88
long_description_content_type = text/x-rst
99
author = Julian Berman
1010
author_email = [email protected]
11-
license_files =
12-
LICENSE
11+
license = MIT
1312
classifiers =
1413
Development Status :: 5 - Production/Stable
1514
Intended Audience :: Developers

test_license.py

Lines changed: 0 additions & 22 deletions
This file was deleted.

tox.ini

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -128,12 +128,3 @@ commands =
128128
{envpython} -m coverage run --rcfile={toxinidir}/.coveragerc -m twisted.trial jsonschema
129129
{envpython} -m coverage xml -o {envtmpdir}/coverage.xml
130130
codecov --required --disable gcov --file {envtmpdir}/coverage.xml
131-
132-
[testenv:check-package-license-file]
133-
recreate = True
134-
deps =
135-
pip-licenses
136-
commands =
137-
pip install {toxinidir}
138-
pip-licenses --from=mixed --with-license-file --format=json --output-file={toxinidir}/license_report.json
139-
{envpython} {toxinidir}/test_license.py

0 commit comments

Comments
 (0)