def test_dmf_change_traits(): with TempDir() as tmpdir: open(os.path.join(tmpdir, DMF.WORKSPACE_CONFIG), "w").write( "_id: this-is-a-temporary-config" ) d = DMF(path=tmpdir, name="my workspace", desc="It is a great place to work") assert d.db_file d.db_file = "newdb.json" assert d.db_file == "newdb.json"
def test_dmf_change_traits(): with TempDir() as tmpdir: open(os.path.join(tmpdir, DMF.WORKSPACE_CONFIG), 'w').write('_id: this-is-a-temporary-config') d = DMF(path=tmpdir, name='my workspace', desc='It is a great place to work') assert d.db_file d.db_file = 'newdb.json' assert d.db_file == 'newdb.json'
def test_dmf_change_traits(): tmp_dir = Path(scratch_dir) / "dmf_change_traits" tmp_dir.mkdir() (tmp_dir / DMF.WORKSPACE_CONFIG).open("w").write("_id: this-is-a-temporary-config") d = DMF(path=tmp_dir, name="my workspace", desc="It is a great place to work") assert d.db_file d.db_file = "newdb.json" assert d.db_file == "newdb.json"