aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile14
-rwxr-xr-xsetup.py28
-rw-r--r--tests/context.py8
-rw-r--r--tests/test_advanced.py16
-rw-r--r--tests/test_basic.py16
5 files changed, 4 insertions, 78 deletions
diff --git a/Makefile b/Makefile
index bf87eea..d87b625 100644
--- a/Makefile
+++ b/Makefile
@@ -1,8 +1,6 @@
-# Copyright (c) 2016-2017 Weitian LI <weitian@aaronly.me>
+# Copyright (c) 2016-2018 Weitian LI <wt@liwt.net>
# MIT license
#
-# Makefile for "fg21sim"
-#
# Credit: http://blog.bottlepy.org/2012/07/16/virtualenv-and-makefiles.html
#
@@ -12,17 +10,13 @@ VENV ?= venv
default:
@echo "+-------------------------------------------------------------+"
- @echo "| Make Utility for fg21sim |"
+ @echo "| Make Utility for FG21sim |"
@echo "+-------------------------------------------------------------+"
@echo "Available targets:"
@echo " + venv [VENV=<venv>]"
@echo " create virtualenv '${VENV}' and install the dependencies"
@echo " + devbuild"
@echo " (build and) install the package to the virtualenv"
- @echo " + test"
- @echo " run the tests"
- @echo " + print-<VARIABLE>"
- @echo " print the value of variable <VARIABLE>"
# Create virtualenv and install/update the dependencies
venv: ${VENV}/bin/activate
@@ -35,10 +29,6 @@ ${VENV}/bin/activate: requirements.txt
devbuild: venv
${VENV}/bin/python3 setup.py install
-# Run the tests
-test: devbuild
- ${VENV}/bin/python3 setup.py test
-
# One liner to get the value of any makefile variable
# Credit: http://blog.jgc.org/2015/04/the-one-line-you-should-add-to-every.html
diff --git a/setup.py b/setup.py
index fbe5a12..e598510 100755
--- a/setup.py
+++ b/setup.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python3
#
-# Copyright (c) 2016-2017 Weitian LI <weitian@aaronly.me>
+# Copyright (c) 2016-2018 Weitian LI <wt@liwt.net>
# MIT license
#
# References:
@@ -16,35 +16,14 @@ import os
import sys
from setuptools import setup, find_packages
-from setuptools.command.test import test as TestCommand
import fg21sim as pkg
-class PyTest(TestCommand):
- user_options = [("pytest-args=", "a", "Arguments to pass to pytest")]
-
- def initialize_options(self):
- TestCommand.initialize_options(self)
- self.pytest_args = []
-
- def finalize_options(self):
- TestCommand.finalize_options(self)
- self.test_args = []
- self.test_suite = True
-
- def run_tests(self):
- # import here, cause outside the eggs aren't loaded
- import pytest
- errno = pytest.main(self.pytest_args)
- sys.exit(errno)
-
-
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
-# Check the minimal Python version
if sys.version_info < (3, 4):
sys.exit("%s requires Python >= 3.4 ..." % pkg.__pkgname__)
@@ -58,8 +37,7 @@ setup(
author_email=pkg.__author_email__,
url=pkg.__url__,
license=pkg.__license__,
- # Trove classifiers
- # See: https://pypi.python.org/pypi?%3Aaction=list_classifiers
+ # Trove classifiers (https://pypi.python.org/pypi?%3Aaction=list_classifiers)
classifiers=[
"Development Status :: 4 - Beta",
"Environment :: Console",
@@ -99,6 +77,4 @@ setup(
dependency_links=[
"git+https://github.com/astropy/regions.git",
],
- tests_require=["pytest"],
- cmdclass={"test": PyTest},
)
diff --git a/tests/context.py b/tests/context.py
deleted file mode 100644
index 352a47b..0000000
--- a/tests/context.py
+++ /dev/null
@@ -1,8 +0,0 @@
-# -*- coding: utf-8 -*-
-
-import sys
-import os
-
-sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))
-
-import fg21sim
diff --git a/tests/test_advanced.py b/tests/test_advanced.py
deleted file mode 100644
index 1ae151c..0000000
--- a/tests/test_advanced.py
+++ /dev/null
@@ -1,16 +0,0 @@
-# -*- coding: utf-8 -*-
-
-from .context import fg21sim
-
-import unittest
-
-
-class AdvancedTestSuite(unittest.TestCase):
- """Advanced test cases."""
-
- def test_thoughts(self):
- sample.hmm()
-
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/tests/test_basic.py b/tests/test_basic.py
deleted file mode 100644
index ea50cf3..0000000
--- a/tests/test_basic.py
+++ /dev/null
@@ -1,16 +0,0 @@
-# -*- coding: utf-8 -*-
-
-from .context import fg21sim
-
-import unittest
-
-
-class BasicTestSuite(unittest.TestCase):
- """Basic test cases."""
-
- def test_absolute_truth_and_meaning(self):
- assert True
-
-
-if __name__ == '__main__':
- unittest.main()