Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
prha committed Aug 25, 2022
1 parent d48096e commit 8106c68
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 13 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
from dagster import job, op, repository


@op
def my_op():
pass


@job
def my_job():
my_op()


@repository
def my_other_repo():
return [my_job]
Original file line number Diff line number Diff line change
Expand Up @@ -282,14 +282,6 @@ def multiproc():
branch_op(out_1)
branch_op(out_2)

@job
def my_job():
my_op()

@repository
def my_other_repo():
return [my_job]


# default executor_def is multiproc
multiproc_job = multiproc.to_job()
Expand Down Expand Up @@ -950,7 +942,7 @@ def test_run_migrate_command():
with instance_for_test() as instance:
create_repo_run(instance)
old_repo_label = "my_repo@repo_pipeline_and_job.py"
new_repo_label = "my_other_repo@test_cli_commands.py"
new_repo_label = "my_other_repo@repo_other_job.py"

assert len(get_repo_runs(instance, old_repo_label)) == 1
assert len(get_repo_runs(instance, new_repo_label)) == 0
Expand All @@ -960,16 +952,16 @@ def test_run_migrate_command():
run_migrate_command,
args=[
"--from",
old_repo_label,
old_repo_label,
"-f",
__file__,
file_relative_path(__file__, "repo_other_job.py"),
"-r",
"my_other_repo",
"-j",
"my_job"
"my_job",
],
input="MIGRATE",
)

assert len(get_repo_runs(instance, old_repo_label)) == 0
assert len(get_repo_runs(instance, new_repo_label)) == 1
assert len(get_repo_runs(instance, new_repo_label)) == 1

0 comments on commit 8106c68

Please sign in to comment.