diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 95845045..2781fb80 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -43,4 +43,4 @@ jobs: - name: Build run: python3 setup.py install --user --sundials-home=/usr --blas-home=/usr/lib/x86_64-linux-gnu/ --lapack-home=/usr/lib/x86_64-linux-gnu/ --superlu-home=/usr --extra-fortran-compile-flags="-fallow-argument-mismatch" - name: Test - run: pytest --verbose tests/ + run: pytest diff --git a/CHANGELOG b/CHANGELOG index 6f3e8818..ddadd012 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -4,6 +4,7 @@ * Improved examples with sparse jacobians by omitting the zeros in the jacobians. * Upgraded to Cython >= 3. * Removed deprecated build option "sundials_with_superlu", which is checked automatically. + * Removed tests from the actual assimulo package. --- Assimulo-3.4.3 --- * Improved compliance with newer scipy version by instead using corresponding numpy calls when more suitable. diff --git a/INSTALL b/INSTALL index 73cefad1..602c59d6 100644 --- a/INSTALL +++ b/INSTALL @@ -20,7 +20,7 @@ Installation is performed using the command: 'python setup.py install --sundials-home=/path/to/sundials --blas-home=/path/to/blas --lapack-home=/path/to/lapack' Assimulo is then installed under Python dist-packages. -To test the installation, run "pytest tests/". +To test the installation, run "pytest" in the Assimulo directory. For more information regarding Assimulo and the installation procedure, please visit: http://www.jmodelica.org/assimulo diff --git a/doc/sphinx/source/installation.rst b/doc/sphinx/source/installation.rst index b50a0d9a..4c93daa8 100644 --- a/doc/sphinx/source/installation.rst +++ b/doc/sphinx/source/installation.rst @@ -60,9 +60,9 @@ the section troubleshooting see :ref:`instTrouble` should be consulted before in .. note:: - To test Assimulo, go into the tests folder and type:: + To test Assimulo, go to the Assimulo directory and type:: - pytest . + pytest Which requires pytest. @@ -88,9 +88,9 @@ After a successful installation, the package will be located in pythons dist-pac .. note:: - To test Assimulo, go into the tests folder and type:: + To test Assimulo, go to the Assimulo directory and type:: - pytest . + pytest Which requires pytest. diff --git a/setup.cfg b/setup.cfg index d88b5ae0..1a92cf01 100644 --- a/setup.cfg +++ b/setup.cfg @@ -11,3 +11,8 @@ install_requires = cython >= 3.0.7 pytest >= 7.4.4 matplotlib > 3 + +# pytest configuration +[tool:pytest] +addopts = -v +testpaths = "tests" diff --git a/setup.py b/setup.py index ea39f04a..61565bfb 100644 --- a/setup.py +++ b/setup.py @@ -202,28 +202,23 @@ def _set_directories(self): self.desSolvers = os.path.join(self.desSrc,"solvers") self.desExamples = os.path.join(self.desSrc,"examples") self.desMain = os.path.join(self.curdir,"build") - self.desTests = os.path.join(self.desSrc,"tests") - self.desTestsSolvers = os.path.join(self.desTests,"solvers") self.desThirdParty=dict([(thp,os.path.join(self.curdir,self.build_assimulo_thirdparty,thp)) for thp in self.thirdparty_methods]) - # filelists + # file lists self.fileSrc = os.listdir("src") self.fileLib = os.listdir(os.path.join("src","lib")) self.fileSolvers = os.listdir(os.path.join("src","solvers")) self.fileExamples= os.listdir("examples") self.fileMain = ["setup.py","README.md","INSTALL","CHANGELOG","MANIFEST.in"] self.fileMainIncludes = ["README.md","CHANGELOG", "LICENSE"] - self.fileTests = os.listdir("tests") self.filelist_thirdparty=dict([(thp,os.listdir(os.path.join("thirdparty",thp))) for thp in self.thirdparty_methods]) - self.fileTestsSolvers = os.listdir(os.path.join("tests","solvers")) def create_assimulo_dirs_and_populate(self): self._set_directories() for subdir in ["lib", "solvers", "examples"]: self.create_dir(os.path.join(self.build_assimulo,subdir)) - self.create_dir(os.path.join(self.build_assimulo, "tests", "solvers")) for pck in self.thirdparty_methods: self.create_dir(os.path.join(self.build_assimulo_thirdparty, pck)) @@ -233,8 +228,6 @@ def create_assimulo_dirs_and_populate(self): self.copy_all_files(self.fileExamples, "examples", self.desExamples) self.copy_all_files(self.fileMain, None, self.desMain) self.copy_all_files(self.fileMainIncludes, None, self.desSrc) - self.copy_all_files(self.fileTests, "tests", self.desTests) - self.copy_all_files(self.fileTestsSolvers, os.path.join("tests","solvers"), self.desTestsSolvers) for f in self.filelist_thirdparty.items(): logging.debug('Thirdparty method {} file {} copied'.format(f[0],f[1])) @@ -724,7 +717,7 @@ def fortran_extensionlists(self): platforms=PLATFORMS, classifiers=CLASSIFIERS, package_dir = {'assimulo':'assimulo'}, - packages=['assimulo', 'assimulo.lib','assimulo.solvers','assimulo.examples','assimulo.tests','assimulo.tests.solvers'], + packages=['assimulo', 'assimulo.lib','assimulo.solvers','assimulo.examples'], #cmdclass = {'build_ext': build_ext}, ext_modules = ext_list, package_data={'assimulo': ['*.pxd', 'version.txt', 'CHANGELOG', 'README.md', 'LICENSE']+license_info+['examples'+os.sep+'kinsol_ors_matrix.mtx',