Guest User

Untitled

a guest
Jun 25th, 2019
141
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. @pytest.mark.datafiles(DATA_DIR)
  2. def test_directory_as_argument(cli, tmpdir):
  3. project = str(DATA_DIR)
  4. project_path = os.path.join(DATA_DIR, 'project.conf')
  5.  
  6. result = cli.run(project=project, args=['init', '--project-name', 'foo', DATA_DIR])
  7. result.assert_success()
  8.  
  9. project_conf = _yaml.load(project_path)
  10. assert _yaml.node_get(project_conf, str, 'name') == 'foo'
  11. assert _yaml.node_get(project_conf, str, 'format-version') == str(BST_FORMAT_VERSION)
  12. assert _yaml.node_get(project_conf, str, 'element-path') == 'elements'
Advertisement
Add Comment
Please, Sign In to add comment