Skip to content

Commit

Permalink
test: reuse git_init() helper
Browse files Browse the repository at this point in the history
  • Loading branch information
sisp committed Apr 16, 2024
1 parent 8904d4c commit 0e5350e
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions tests/test_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,14 @@

import pytest
from plumbum import local
from plumbum.cmd import git
from pydantic import ValidationError

import copier
from copier.errors import InvalidConfigFileError, MultipleConfigFilesError
from copier.template import DEFAULT_EXCLUDE, Task, Template, load_template_config
from copier.types import AnyByStrDict

from .helpers import BRACKET_ENVOPS_JSON, SUFFIX_TMPL, build_file_tree
from .helpers import BRACKET_ENVOPS_JSON, SUFFIX_TMPL, build_file_tree, git_init

GOOD_ENV_OPS = {
"autoescape": True,
Expand All @@ -29,14 +28,6 @@
}


def git_init(message: str = "hello world") -> None:
git("init")
git("config", "user.name", "Copier Test")
git("config", "user.email", "test@copier")
git("add", ".")
git("commit", "-m", message)


def test_config_data_is_loaded_from_file() -> None:
tpl = Template("tests/demo_data")
assert tpl.exclude == ("exclude1", "exclude2")
Expand Down

0 comments on commit 0e5350e

Please sign in to comment.