Skip to content

Commit 0b9fef3

Browse files
authored
Remove deprecated setup_requires and pytest-runner (audreyfeldroy#617)
* Remove deprecated setup requires and pytest-runner * Update test_bake_project.py * Update setup.cfg * Update requirements_dev.txt
1 parent 9b5b59e commit 0b9fef3

File tree

4 files changed

+2
-13
lines changed

4 files changed

+2
-13
lines changed

tests/test_bake_project.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -220,9 +220,7 @@ def test_using_pytest(cookies):
220220
lines = test_file_path.readlines()
221221
assert "import pytest" in ''.join(lines)
222222
# Test the new pytest target
223-
run_inside_dir('python setup.py pytest', str(result.project)) == 0
224-
# Test the test alias (which invokes pytest)
225-
run_inside_dir('python setup.py test', str(result.project)) == 0
223+
run_inside_dir('pytest', str(result.project)) == 0
226224

227225

228226
def test_not_using_pytest(cookies):

{{cookiecutter.project_slug}}/requirements_dev.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,4 @@ twine==1.14.0
1010
{% if cookiecutter.command_line_interface|lower == 'click' -%}
1111
Click==7.0{% endif %}
1212
{% if cookiecutter.use_pytest == 'y' -%}
13-
pytest==4.6.5
14-
pytest-runner==5.1{% endif %}
13+
pytest==6.2.4{% endif %}

{{cookiecutter.project_slug}}/setup.cfg

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,7 @@ universal = 1
1717
[flake8]
1818
exclude = docs
1919

20-
[aliases]
21-
# Define setup.py command aliases here
2220
{%- if cookiecutter.use_pytest == 'y' %}
23-
test = pytest
24-
2521
[tool:pytest]
2622
collect_ignore = ['setup.py']
2723
{%- endif %}
28-

{{cookiecutter.project_slug}}/setup.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@
1212

1313
requirements = [{%- if cookiecutter.command_line_interface|lower == 'click' %}'Click>=7.0',{%- endif %} ]
1414

15-
setup_requirements = [{%- if cookiecutter.use_pytest == 'y' %}'pytest-runner',{%- endif %} ]
16-
1715
test_requirements = [{%- if cookiecutter.use_pytest == 'y' %}'pytest>=3',{%- endif %} ]
1816

1917
{%- set license_classifiers = {
@@ -57,7 +55,6 @@
5755
keywords='{{ cookiecutter.project_slug }}',
5856
name='{{ cookiecutter.project_slug }}',
5957
packages=find_packages(include=['{{ cookiecutter.project_slug }}', '{{ cookiecutter.project_slug }}.*']),
60-
setup_requires=setup_requirements,
6158
test_suite='tests',
6259
tests_require=test_requirements,
6360
url='https://github.com/{{ cookiecutter.github_username }}/{{ cookiecutter.project_slug }}',

0 commit comments

Comments
 (0)