Skip to content

Commit

Permalink
Test build artifacts
Browse files Browse the repository at this point in the history
  • Loading branch information
frostming committed Apr 3, 2021
1 parent 09340ea commit a404a5d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
7 changes: 3 additions & 4 deletions pdm/pep508.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,17 @@
import os
import platform
import sys
from typing import Dict


def format_full_version(info) -> str: # type: ignore
version = f"{info.major}.{info.minor}.{info.micro}"
def format_full_version(info):
version = "{0.major}.{0.minor}.{0.micro}".format(info)
kind = info.releaselevel
if kind != "final":
version += kind[0] + str(info.serial)
return version


def default_environment() -> Dict[str, str]:
def default_environment():
if hasattr(sys, "implementation"):
iver = format_full_version(sys.implementation.version)
implementation_name = sys.implementation.name
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,4 @@ disallow_untyped_calls = True
disallow_untyped_defs = True
disallow_untyped_decorators = True
files = pdm/**/*.py
exclude = pdm/(pep582|_vendor)/
exclude = pdm/(pep582|_vendor|pep508)
6 changes: 4 additions & 2 deletions tests/test_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,13 @@ def new_invoke(args, **kwargs):
def test_basic_integration(python_version, project_no_init, strict_invoke):
"""An e2e test case to ensure PDM works on all supported Python versions"""
project = project_no_init
strict_invoke(["init"], input="\n\n\n\n\n>=2.7\n", obj=project)
project.root.joinpath("foo.py").write_text("import django\n")
strict_invoke(["init"], input="\ny\n\n\n\n\n\n>=2.7\n", obj=project)
strict_invoke(["use", "-f", python_version], obj=project)
project._environment = None
strict_invoke(["add", "django"], obj=project)
strict_invoke(["run", "django-admin", "--help"], obj=project)
strict_invoke(["run", "python", "foo.py"], obj=project)
strict_invoke(["build", "-v"], obj=project)
strict_invoke(["remove", "django"], obj=project)
result = strict_invoke(["list"], obj=project)
assert not any(
Expand Down

0 comments on commit a404a5d

Please sign in to comment.