Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions tests/divvytests/divvy_tests/test_divvy.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""Assorted divvy tests"""

import pytest
from yacman import YacAttMap, load_yaml
from yacman import YAMLConfigManager, load_yaml
from looper.divvy import DEFAULT_COMPUTE_RESOURCES_NAME
from tests.divvytests.conftest import DCC_ATTRIBUTES, FILES, mock_env_missing

Expand Down Expand Up @@ -60,9 +60,9 @@ class TestGettingActivePackage:
"""Test for the get_active_package method"""

def test_settings_nonempty(self, dcc):
"""Test if get_active_package produces a nonempty YacAttMap object"""
"""Test if get_active_package produces a nonempty YAMLConfigManager object"""
settings = dcc.get_active_package()
assert settings != YacAttMap()
assert settings != YAMLConfigManager()


class TestListingPackages:
Expand All @@ -87,7 +87,7 @@ def test_reset_active_settings(self, dcc):
def test_reset_active_settings_works(self, dcc):
"""Test if the settings are cleared"""
dcc.reset_active_settings()
assert dcc.get_active_package() == YacAttMap({})
assert dcc.get_active_package() == YAMLConfigManager({})


class UpdatingPackagesTests:
Expand All @@ -98,4 +98,4 @@ def test_update_packages(self, dcc, config_file):
"""Test updating does not produce empty compute packages"""
entries = load_yaml(config_file)
dcc.update(entries)
assert dcc["compute_packages"] != YacAttMap()
assert dcc["compute_packages"] != YAMLConfigManager()
6 changes: 3 additions & 3 deletions tests/divvytests/test_divvy_simple.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import pytest
from collections import OrderedDict

from yacman import YacAttMap
from yacman import YAMLConfigManager
from looper.divvy import select_divvy_config

# For interactive debugging:
Expand Down Expand Up @@ -49,7 +49,7 @@ def test_write_script(self):
# "compute",
# [
# dict({"mem": 1000, "test": 0}),
# YacAttMap({"mem": 1000, "test": 0}),
# YAMLConfigManager({"mem": 1000, "test": 0}),
# OrderedDict({"mem": 1000, "test": 0}),
# ],
# )
Expand All @@ -68,7 +68,7 @@ def test_write_script(self):
# def test_adapters_overwitten_by_others(self):
# dcc = divvy.ComputingConfiguration()
# dcc.activate_package("singularity_slurm")
# compute = YacAttMap({"mem": 1000})
# compute = YAMLConfigManager({"mem": 1000})
# extra_vars = [{"compute": compute}, {"MEM": 333}]
# dcc.write_script("test1.sub", extra_vars)
# with open("test1.sub", "r") as f:
Expand Down