diff --git a/requirements.txt b/requirements.txt index 636925a..8e800f0 100644 --- a/requirements.txt +++ b/requirements.txt @@ -5,3 +5,4 @@ enzyme>=0.4.1 click>=6.7 langdetect>=1.0.7 titlecase>=0.12.0 +pytest>=5.3.5 diff --git a/test/__init__.py b/test/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/test/test_import.py b/test/test_import.py new file mode 100644 index 0000000..dedea7c --- /dev/null +++ b/test/test_import.py @@ -0,0 +1,6 @@ +import sys, os +sys.path.append(os.path.realpath(os.path.dirname(__file__)+"/../src")) + +def test_import_env_variables(): + import env_variables as env + assert env.logfile == 'conf/output.log' diff --git a/test/test_square.py b/test/test_square.py new file mode 100644 index 0000000..419c80b --- /dev/null +++ b/test/test_square.py @@ -0,0 +1,9 @@ + +def square(x): + return x * x + +def test_square(): + assert square(2) == 4 + +def test_square_negative(): + assert square(-2) == 4