Skip to content

Commit

Permalink
Fix release of redun-0.16.0 (#305)
Browse files Browse the repository at this point in the history
* fix tests

* make skip-import slightly more robust
  • Loading branch information
mattrasmus committed Jun 22, 2023
1 parent 47fd162 commit f28601e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
4 changes: 2 additions & 2 deletions redun/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@

try:
from redun.executors.k8s import K8SExecutor
except ModuleNotFoundError:
except (ImportError, ModuleNotFoundError):
# Skip k8s executor if kubernetes is not installed.
pass
try:
from redun.executors.gcp_batch import GCPBatchExecutor
except ModuleNotFoundError:
except (ImportError, ModuleNotFoundError):
# Skip gcp_batch executor if google-cloud-batch is not installed.
pass
from redun.executors.local import LocalExecutor
Expand Down
14 changes: 10 additions & 4 deletions redun/tests/test_repos.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,11 @@ def carrots(x: int):
)

# Sync repos local -> other
output = run_command(client, ["redun", "pull", "other"])
assert output == "Pulled 9 new record(s) from repo 'other'\n"
lines = run_command(client, ["redun", "pull", "other"]).split("\n")
assert_match_lines(
[r"Pulled \d+ new record\(s\) from repo 'other'", ""],
lines,
)

# Should now have cached value from sync.
client.execute(["redun", "run", "workflow.py", "carrots", "--x", "10"])
Expand All @@ -201,8 +204,11 @@ def carrots(x: int):
client.execute(["redun", "--repo", "other", "push", "other"])

# Now push to the remote
output = run_command(client, ["redun", "push", "other"])
assert output == "Pushed 14 record(s) to repo 'other'\n"
lines = run_command(client, ["redun", "push", "other"]).split("\n")
assert_match_lines(
[r"Pushed \d+ record\(s\) to repo 'other'", ""],
lines,
)
lines = run_command(client, ["redun", "--repo", "other", "log", "--exec"]).split("\n")
assert_match_lines(
[
Expand Down

0 comments on commit f28601e

Please sign in to comment.