Skip to content

Commit

Permalink
Moved skipping logic to be above dask import.
Browse files Browse the repository at this point in the history
  • Loading branch information
alxmrs committed Jul 11, 2022
1 parent 804134a commit c5b20f9
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions sdks/python/apache_beam/runners/dask/dask_runner_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,24 @@
#
import unittest

try:
import dask
except (ImportError, ModuleNotFoundError):
raise unittest.SkipTest('Dask must be installed to run tests.')

import apache_beam as beam
from apache_beam.runners.dask.dask_runner import DaskRunner
from apache_beam.testing import test_pipeline
from apache_beam.testing.util import assert_that
from apache_beam.testing.util import equal_to

try:
import dask
except (ImportError, ModuleNotFoundError):
raise unittest.SkipTest('Dask must be installed to run tests.')


class DaskRunnerRunPipelineTest(unittest.TestCase):
"""Test class used to introspect the dask runner via a debugger."""

def setUp(self) -> None:
self.pipeline = test_pipeline.TestPipeline(runner=DaskRunner())
self.pipeline = test_pipeline.TestPipeline(runner=DaskRunner())

def test_create(self):
with self.pipeline as p:
Expand Down

0 comments on commit c5b20f9

Please sign in to comment.