Skip to content

Commit

Permalink
fix test issues
Browse files Browse the repository at this point in the history
  • Loading branch information
trappitsch committed Feb 20, 2024
1 parent d69fb64 commit b8a8261
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .python-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.12.1
3.8.18
6 changes: 5 additions & 1 deletion requirements-dev.lock
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@
click==8.1.7
# via box
coverage==7.4.1
# via coverage
# via pytest-cov
exceptiongroup==1.2.0
# via pytest
iniconfig==2.0.0
# via pytest
packaging==23.2
Expand All @@ -25,5 +26,8 @@ pytest==8.0.0
pytest-cov==4.1.0
pytest-mock==3.12.0
ruff==0.1.15
tomli==2.0.1
# via coverage
# via pytest
tomlkit==0.12.3
# via box
2 changes: 1 addition & 1 deletion src/box/cleaner.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def _clean_folders(self):
if self._cleaned_whole_project:
click.echo("The whole project was cleaned.")
else:
click.echo(f"Folder(s) {", ".join(self.folders_to_clean)} cleaned.")
click.echo(f"Folder(s) {', '.join(self.folders_to_clean)} cleaned.")

def _clean_build_folder(self):
"""Clean the pyapp specific file/folder(s) in the build folder."""
Expand Down
2 changes: 1 addition & 1 deletion tests/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

# fixme: pycharm does not recognize the `rye` command, fix path for linux
if not os.environ["PATH"].__contains__("rye"):
os.environ["PATH"] += f":{os.path.expanduser("~")}/.rye/shims"
os.environ["PATH"] += f":{os.path.expanduser('~')}/.rye/shims"
4 changes: 3 additions & 1 deletion tests/cli/test_cli_clean.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# CLI tests for cleaning the project folder

from typing import List

from pathlib import Path

from click.testing import CliRunner
Expand All @@ -8,7 +10,7 @@
from box.cli import cli


def setup_folders(project_folder: Path) -> list[Path]:
def setup_folders(project_folder: Path) -> List[Path]:
"""Setup `dist`, `build`, `target` folder.
The `dist` and `target` folder get a file each. The `build` folder gets a
Expand Down
2 changes: 1 addition & 1 deletion tests/cli/test_cli_packager.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def test_package_project(rye_project, mocker):
# create dist folder and package
dist_folder = rye_project.joinpath("dist")
dist_folder.mkdir()
dist_folder.joinpath(f"{rye_project.name.replace("-", "_")}-v0.1.0.tar.gz").touch()
dist_folder.joinpath(f"{rye_project.name.replace('-', '_')}-v0.1.0.tar.gz").touch()

# create fake source and pyapp directory
build_dir = rye_project.joinpath("build")
Expand Down

0 comments on commit b8a8261

Please sign in to comment.