Skip to content

Commit

Permalink
Fix bug in bugfix, imports not properly done (#194)
Browse files Browse the repository at this point in the history
  • Loading branch information
berland authored Jan 20, 2021
1 parent 7bb828f commit 25ee7eb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/fmu/ensemble/ensemble.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
from ecl import EclDataType
from ecl.eclfile import EclKW

from .etc import Interaction # noqa
from .realization import ScratchRealization
from .virtualrealization import VirtualRealization
from .virtualensemble import VirtualEnsemble
Expand Down
9 changes: 6 additions & 3 deletions tests/test_etc.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
"""Test a deprecated submodule"""

from fmu import ensemble
from fmu.ensemble import etc

import pytest

from fmu import ensemble


def test_deprecated_etc():
"""The following lines was in documentation up to 1.4.0 inclusive.
Expand All @@ -18,6 +17,10 @@ def test_deprecated_etc():
logger = fmux.basiclogger(__name__, level="WARNING")
logger.info("testing deprecated code")

# pylint: disable=import-outside-toplevel
# Test different import:
from fmu.ensemble import etc

with pytest.warns(DeprecationWarning):
fmux = etc.Interaction()
logger = fmux.basiclogger(__name__, level="WARNING")
Expand Down

0 comments on commit 25ee7eb

Please sign in to comment.