Skip to content

Commit

Permalink
fix: slow test when rb is not present (#163)
Browse files Browse the repository at this point in the history
  • Loading branch information
nichmor authored Jul 4, 2024
1 parent cdb8c2a commit 3b56e33
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/repror/internals/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ def load_all_recipes(config_path: str = "config.yaml") -> list[RecipeDB | Remote
for repo, recipes in recipes_to_fetch.items()
],
)
[save(recipe) for recipe in recipes for recipes in remote_recipes]
[save(recipe) for repo_recipes in remote_recipes for recipe in repo_recipes]
[recipes.extend(recipe_list) for recipe_list in remote_recipes]

for local in config.local:
Expand Down
4 changes: 4 additions & 0 deletions src/repror/internals/print.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import platform

from rich import print as rich_print
from rich.table import Table
from typing import Any, IO, Optional
from .options import global_options

Expand Down Expand Up @@ -58,6 +59,9 @@ def print(
logging.debug("Disabled output")
return

if objects and isinstance(objects[0], Table):
return rich_print(*objects, sep=sep, end=end, file=file, flush=flush)

if platform.system() == "Windows":
return rich_print(
strip_emojis(*objects), sep=sep, end=end, file=file, flush=flush
Expand Down
8 changes: 8 additions & 0 deletions tests/test_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ def test_build_boltons(
test_config_yaml_path,
"build-recipe",
"boltons",
"--rattler-build-exe",
"non_existing",
],
catch_exceptions=False,
)
Expand All @@ -47,6 +49,8 @@ def test_build_boltons(
test_config_yaml_path,
"build-recipe",
"boltons",
"--rattler-build-exe",
"non_existing",
],
catch_exceptions=False,
)
Expand Down Expand Up @@ -89,6 +93,8 @@ def test_rebuild_build_boltons(
test_config_yaml_path,
"rebuild-recipe",
"boltons",
"--rattler-build-exe",
"non_existing",
],
catch_exceptions=False,
)
Expand All @@ -101,6 +107,8 @@ def test_rebuild_build_boltons(
test_config_yaml_path,
"rebuild-recipe",
"boltons",
"--rattler-build-exe",
"non_existing",
],
catch_exceptions=False,
)
Expand Down

0 comments on commit 3b56e33

Please sign in to comment.