Skip to content

Commit

Permalink
hydra_restore_singletons no longer directly restore OmegaConf resolve…
Browse files Browse the repository at this point in the history
…rs (Singleton.set_state does that)
  • Loading branch information
omry committed Aug 23, 2020
1 parent 78fc70e commit 6a81dfc
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions hydra/extra/pytest_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
from typing import Callable, List, Optional

import pytest
from omegaconf.basecontainer import BaseContainer

from hydra.core.singleton import Singleton
from hydra.test_utils.test_utils import SweepTaskFunction, TaskTestFunction
Expand All @@ -17,10 +16,8 @@ def hydra_restore_singletons() -> None:
Restore singletons state after the function returns
"""
state = copy.deepcopy(Singleton.get_state())
resolvers = copy.deepcopy(BaseContainer._resolvers)
yield
Singleton.set_state(state)
BaseContainer._resolvers = resolvers


@pytest.fixture(scope="function") # type: ignore
Expand Down

0 comments on commit 6a81dfc

Please sign in to comment.