Skip to content

Commit c432fd5

Browse files
authored
Refactor the test suite using pytest for array and matrix types (#438)
* reorganize travis matrix, extend conftest.py * pytestify bdalg_test * pytestify canonical_test * pytestify config_test * pytestify convert_test.py * pytestify ctrlutil_test * pytestify delay_test.py * pytestify discrete_test * pytestify flatsys_test * pytestify frd_test * pytestify freqresp_test.py * pytestify input_element_int_test * pytestify iosys_test * pytestify lti_test.py * pytestify mateqn_test * pytestify matlab tests * pytestify minreal_test * pytestify modelsimp * pytestify nichols_test * pytestify phaseplot_test * pytestify rlocus_test.py * pytestify robust tests * pytestify sisotool_test.py * pytestify slycot_convert_test.py * pytestify statefbk tests * pytestify statesp tests * pytestify timeresp_test.py * pytestify xferfcn_input_test.py remove a lot of duplicate code by converting everything into a single parametrized test function. * pytestify xferfcn tests * make tests work with pre #431 source code state revert this commit when merging a rebased #431 (remove statesp_test.py::test_copy_constructor_nodt if not applicable)
1 parent 4eee1f3 commit c432fd5

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+4559
-6062
lines changed

.travis.yml

Lines changed: 17 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -13,72 +13,38 @@ cache:
1313
- $HOME/.local
1414

1515
python:
16+
- "3.9"
17+
- "3.8"
1618
- "3.7"
1719
- "3.6"
18-
- "2.7"
1920

20-
# Test against multiple version of SciPy, with and without slycot
21-
#
22-
# Because there were significant changes in SciPy between v0 and v1, we
23-
# test against both of these using the Travis CI environment capability
24-
#
25-
# We also want to test with and without slycot
2621
env:
2722
- SCIPY=scipy SLYCOT=conda # default, with slycot via conda
2823
- SCIPY=scipy SLYCOT= # default, w/out slycot
29-
- SCIPY="scipy==0.19.1" SLYCOT= # legacy support, w/out slycot
3024

3125
# Add optional builds that test against latest version of slycot, python
3226
jobs:
3327
include:
34-
- name: "linux, Python 2.7, slycot=source"
35-
os: linux
36-
dist: xenial
37-
services: xvfb
38-
python: "2.7"
39-
env: SCIPY=scipy SLYCOT=source
40-
- name: "linux, Python 3.7, slycot=source"
41-
os: linux
42-
dist: xenial
43-
services: xvfb
44-
python: "3.7"
45-
env: SCIPY=scipy SLYCOT=source
46-
- name: "linux, Python 3.8, slycot=source"
47-
os: linux
48-
dist: xenial
49-
services: xvfb
28+
- name: "Python 3.8, slycot=source"
5029
python: "3.8"
5130
env: SCIPY=scipy SLYCOT=source
52-
- name: "use numpy matrix"
53-
dist: xenial
54-
services: xvfb
55-
python: "3.8"
56-
env: SCIPY=scipy SLYCOT=source PYTHON_CONTROL_STATESPACE_ARRAY=1
57-
58-
# Exclude combinations that are very unlikely (and don't work)
59-
exclude:
60-
- python: "3.7" # python3.7 should use latest scipy
31+
- name: "Python 3.9, slycot=source, array and matrix"
32+
python: "3.9"
33+
env: SCIPY=scipy SLYCOT=source PYTHON_CONTROL_ARRAY_AND_MATRIX=1
34+
# Because there were significant changes in SciPy between v0 and v1, we
35+
# also test against the latest v0 (without Slycot) for old pythons.
36+
# newer pythons should always use newer SciPy.
37+
- name: "Python 2.7, Scipy 0.19.1"
38+
python: "2.7"
39+
env: SCIPY="scipy==0.19.1" SLYCOT=
40+
- name: "Python 3.6, Scipy 0.19.1"
41+
python: "3.6"
6142
env: SCIPY="scipy==0.19.1" SLYCOT=
6243

6344
allow_failures:
64-
- name: "linux, Python 2.7, slycot=source"
65-
os: linux
66-
dist: xenial
67-
services: xvfb
68-
python: "2.7"
69-
env: SCIPY=scipy SLYCOT=source
70-
- name: "linux, Python 3.7, slycot=source"
71-
os: linux
72-
dist: xenial
73-
services: xvfb
74-
python: "3.7"
75-
env: SCIPY=scipy SLYCOT=source
76-
- name: "linux, Python 3.8, slycot=source"
77-
os: linux
78-
dist: xenial
79-
services: xvfb
80-
python: "3.8"
81-
env: SCIPY=scipy SLYCOT=source
45+
- env: SCIPY=scipy SLYCOT=source
46+
- env: SCIPY=scipy SLYCOT=source PYTHON_CONTROL_ARRAY_AND_MATRIX=1
47+
8248

8349
# install required system libraries
8450
before_install:

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy