From 5eb82eb983ffdd16b70554141330b5adb0a59bec Mon Sep 17 00:00:00 2001 From: elaynelemos Date: Tue, 23 Jun 2020 15:00:36 -0300 Subject: [PATCH] Fixes broken tests --- .travis.yml | 1 - tests/conftest.py | 1 - tests/test_creation.py | 18 ++++++++---------- tox.ini | 3 +-- 4 files changed, 9 insertions(+), 14 deletions(-) diff --git a/.travis.yml b/.travis.yml index fb15dbc9b..290e76cb5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,7 +5,6 @@ python: - 3.8 - 3.7 - 3.6 - - 3.5 # command to install dependencies, e.g. # pip install -r requirements.txt --use-mirrors diff --git a/tests/conftest.py b/tests/conftest.py index 4847646b9..c154aee33 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -9,7 +9,6 @@ args = { 'project_name': 'DrivenData', 'author_name': 'DrivenData', - 'python_interpreter': 'python' } diff --git a/tests/test_creation.py b/tests/test_creation.py index ef998ffa1..f658abbc5 100644 --- a/tests/test_creation.py +++ b/tests/test_creation.py @@ -47,7 +47,7 @@ def test_readme(self): assert no_curlies(readme_path) if pytest.param.get('project_name'): with open(readme_path) as fin: - assert 'DrivenData' == next(fin).strip() + assert '# DrivenData' == next(fin).strip() def test_setup(self): setup_ = self.path / 'setup.py' @@ -62,12 +62,10 @@ def test_requirements(self): assert reqs_path.exists() assert no_curlies(reqs_path) - if pytest.param.get('python_interpreter'): - with open(reqs_path) as fin: - lines = list(map(lambda x: x.strip(), fin.readlines())) - assert 'pathlib2' in lines def test_folders(self): + project = str(self.path) + project = project[project.rfind('/', 0, len(project)) + 1:] expected_dirs = [ 'data', 'data/external', @@ -81,11 +79,11 @@ def test_folders(self): 'references', 'reports', 'reports/figures', - '{{ cookiecutter.repo_name }}', - '{{ cookiecutter.repo_name }}/data', - '{{ cookiecutter.repo_name }}/features', - '{{ cookiecutter.repo_name }}/models', - '{{ cookiecutter.repo_name }}/visualization', + "{}".format(project), + "{}/data".format(project), + "{}/features".format(project), + "{}/models".format(project), + "{}/visualization".format(project), ] ignored_dirs = [ diff --git a/tox.ini b/tox.ini index 2a1794ee5..5bb34c184 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py35, py36, py37,py38 pypy, docs +envlist = py36, py37,py38 pypy, docs skipsdist = true [travis] @@ -7,7 +7,6 @@ python = 3.8: py38 3.7: py37 3.6: py36 - 3.5: py35 [testenv:flake8] basepython = python