Skip to content

Commit

Permalink
Removing redundant tests from component_tests/test_utils.py
Browse files Browse the repository at this point in the history
  • Loading branch information
freddyaboulton committed Jun 30, 2020
1 parent a7ac049 commit 0adc224
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions evalml/tests/component_tests/test_utils.py
@@ -1,6 +1,4 @@
import inspect
from importlib import import_module
from unittest.mock import patch

import pytest

Expand All @@ -19,19 +17,6 @@ def test_all_components(has_minimal_dependencies):
assert len(all_components()) == 24


def make_mock_import_module(libs_to_exclude):
def _import_module(library):
if library in libs_to_exclude:
raise ImportError("Cannot import {}; excluded by mock muahahaha".format(library))
return import_module(library)
return _import_module


@patch('importlib.import_module', make_mock_import_module({'xgboost', 'catboost'}))
def test_all_components_core_dependencies_mock():
assert len(all_components()) == 20


def test_handle_component_class_names():
for cls in all_components():
cls_ret = handle_component_class(cls)
Expand Down

0 comments on commit 0adc224

Please sign in to comment.