Skip to content

Commit

Permalink
Prepare future test
Browse files Browse the repository at this point in the history
  • Loading branch information
abravalheri committed Jul 9, 2020
1 parent 7c0fd7b commit 3607595
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions tests/test_cookiecutter.py
Expand Up @@ -3,6 +3,7 @@
import logging
import re
import sys
from configparser import ConfigParser
from os.path import exists as path_exists

import pytest
Expand Down Expand Up @@ -45,9 +46,16 @@ def test_create_project_with_cookiecutter(tmpfolder):
# then cookiecutter files should exist
for path in COOKIECUTTER_FILES:
assert path_exists(path)

# and also overwritable pyscaffold files (with the exact contents)
existing_setup = tmpfolder.join(PROJ_NAME).join("setup.py").read()
assert existing_setup == setup_py(opts)
assert tmpfolder.join(PROJ_NAME).join("setup.py").read() == setup_py(opts)

# and the cookiecutter configuration should be stored in setup.cfg
existing_setup = tmpfolder.join(PROJ_NAME).join("setup.cfg").read()
cfg = ConfigParser()
cfg.read_string(existing_setup)
# TODO
# assert cfg.get("pyscaffold", "cookiecutter") == COOKIECUTTER_URL


def test_pretend_create_project_with_cookiecutter(tmpfolder, caplog):
Expand Down

0 comments on commit 3607595

Please sign in to comment.