Skip to content

Commit

Permalink
* test case for issue #88 and fix in config.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Marvin Jens committed Jan 26, 2024
1 parent cd5e26e commit 4e8dad3
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion spacemake/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -710,7 +710,7 @@ def delete_variable(self, variable_name, variable_key, **kw):

return variable_data

def process_run_mode_args(self, **kwargs):
def process_run_mode_args(self, name=None, **kwargs):
# typeset boolean values of run_mode
default_run_mode = self.get_variable("run_modes", "default")

Expand Down
13 changes: 13 additions & 0 deletions tests/test_cmdline.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,19 @@ def test_runmode(initialized_root):
config = get_global_config()
config.dump()

def test_issue_88(initialized_root):
os.chdir(initialized_root.as_posix())
# name added to config.yaml when creating a new run mode #88
# add
sm("config", "add_run_mode", "--name", "newrunmode")
from spacemake.config import get_global_config
config = get_global_config()
config.dump()
inserted = config.variables['run_modes']['newrunmode']
print("here's what we inserted", inserted)
assert "name" not in inserted


def test_sample(configured_root):
os.chdir(configured_root.as_posix())
test_sample = (
Expand Down

0 comments on commit 4e8dad3

Please sign in to comment.