Minor improvements

This commit is contained in:
Ivan Kravets
2020-09-02 18:49:00 +03:00
parent 44c2b65372
commit 6e5198f373
5 changed files with 9 additions and 7 deletions

View File

@ -160,7 +160,7 @@ env.LoadPioPlatform()
env.SConscriptChdir(0)
env.SConsignFile(
join("$BUILD_DIR", ".sconsign%d%d.db" % (sys.version_info[0], sys.version_info[1]))
join("$BUILD_DIR", ".sconsign%d%d" % (sys.version_info[0], sys.version_info[1]))
)
for item in env.GetExtraScripts("pre"):

View File

@ -55,7 +55,7 @@ class MissingPackageManifestError(ManifestException):
class UnknownPackageError(UserSideException):
MESSAGE = (
"Could not find a package with '{0}' requirements for your system '%s'"
"Could not find the package with '{0}' requirements for your system '%s'"
% util.get_systype()
)

View File

@ -106,7 +106,7 @@ class PackageManagerInstallMixin(object):
if not silent:
self.print_message(
"{name} @ {version} has been successfully installed!".format(
"{name} @ {version} has been installed!".format(
**pkg.metadata.as_dict()
),
fg="green",

View File

@ -37,9 +37,8 @@ class PackageManagerUninstallMixin(object):
if not silent:
self.print_message(
"Removing %s @ %s: \t"
"Removing %s @ %s"
% (click.style(pkg.metadata.name, fg="cyan"), pkg.metadata.version),
nl=False,
)
# firstly, remove dependencies
@ -68,7 +67,10 @@ class PackageManagerUninstallMixin(object):
self.memcache_reset()
if not silent:
click.echo("[%s]" % click.style("OK", fg="green"))
self.print_message(
"{name} @ {version} has been removed!".format(**pkg.metadata.as_dict()),
fg="green",
)
return pkg

View File

@ -119,7 +119,7 @@ def test_update_check(clirunner, validate_cliresult, isolated_pio_core):
def test_update_raw(clirunner, validate_cliresult, isolated_pio_core):
result = clirunner.invoke(cli_platform.platform_update)
validate_cliresult(result)
assert "Removing atmelavr @ 2.0.0:" in result.output
assert "Removing atmelavr @ 2.0.0" in result.output
assert "Platform Manager: Installing platformio/atmelavr @" in result.output
assert len(isolated_pio_core.join("packages").listdir()) == 2