Skip to content

Commit

Permalink
fix tty
Browse files Browse the repository at this point in the history
  • Loading branch information
C-Loftus committed Nov 28, 2024
1 parent 0c9596a commit 702fad9
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
2 changes: 1 addition & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ def test():
containerName = containerName.strip() # Container name sometimes has extra \n

# If we are in CI/CD we need to skip the interactive / terminal flags
if sys.stdin.isatty():
if not sys.stdin.isatty():
run_subprocess(f"docker exec {containerName} pytest")
else:
run_subprocess(f"docker exec -it {containerName} pytest")
Expand Down
13 changes: 12 additions & 1 deletion userCode/test/test_e2e.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,20 @@
import userCode.main as main


from dagster import AssetsDefinition, AssetSpec, SourceAsset


def test_materialize_configs():
assets = load_assets_from_modules([main])
# It is possible to load certain asset types that cannot be passed into
# Materialize so we filter them to avoid a pyright type error
filtered_assets = [
asset
for asset in assets
if isinstance(asset, (AssetsDefinition, AssetSpec, SourceAsset))
]
result = materialize(
assets=load_assets_from_modules([main]), # type: ignore
assets=filtered_assets,
selection=["nabu_config", "gleaner_config", "docker_client_environment"],
)
assert result.success

0 comments on commit 702fad9

Please sign in to comment.