Skip to content

Commit

Permalink
Use py.test in generated project
Browse files Browse the repository at this point in the history
  • Loading branch information
bobbyno committed Mar 22, 2019
1 parent a3ce423 commit 6e4bfe4
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 19 deletions.
1 change: 0 additions & 1 deletion tests/test_creation.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,4 +92,3 @@ def test_folders(self):
abs_expected_dirs = [str(self.path / d) for d in expected_dirs]
abs_dirs, _, _ = list(zip(*os.walk(self.path)))
assert len(set(abs_expected_dirs + ignored_dirs) - set(abs_dirs)) == 0

2 changes: 1 addition & 1 deletion {{ cookiecutter.repo_name }}/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ create_environment:

## Test python environment is setup correctly
test_environment:
python test_environment.py
py.test tests/test_python_version.py

#################################################################################
# PROJECT RULES #
Expand Down
17 changes: 0 additions & 17 deletions {{ cookiecutter.repo_name }}/test_python_version.py

This file was deleted.

9 changes: 9 additions & 0 deletions {{ cookiecutter.repo_name }}/tests/test_python_version.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import sys


def test_version():
system_major = sys.version_info.major
required_major = 3

assert system_major == required_major, \
"This project requires Python {}. Found: Python {}".format(required_major, sys.version)

0 comments on commit 6e4bfe4

Please sign in to comment.