Skip to content

Commit 007a498

Browse files
committed
reorder imports in tests based on pylint
1 parent 5e94d08 commit 007a498

10 files changed

Lines changed: 31 additions & 17 deletions

tests/test_FMIExport.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
import OMPython
21
import shutil
32
import os
43
import pathlib
54

5+
import OMPython
6+
67

78
def test_CauerLowPassAnalog():
89
mod = OMPython.ModelicaSystem()

tests/test_FMIImport.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
import numpy as np
21
import os
3-
import pytest
42
import shutil
53

4+
import numpy as np
5+
import pytest
6+
67
import OMPython
78

89

tests/test_FMIRegression.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
import OMPython
21
import tempfile
32
import pathlib
43
import shutil
54
import os
65

6+
import OMPython
7+
78

89
def buildModelFMU(modelName):
910
omc = OMPython.OMCSessionZMQ()

tests/test_ModelicaSystem.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1-
import OMPython
21
import os
32
import pathlib
4-
import pytest
53
import sys
64
import tempfile
5+
76
import numpy as np
7+
import pytest
8+
9+
import OMPython
810

911
skip_on_windows = pytest.mark.skipif(
1012
sys.platform.startswith("win"),
@@ -19,13 +21,14 @@
1921

2022
@pytest.fixture
2123
def model_firstorder_content():
22-
return ("""model M
24+
return """
25+
model M
2326
Real x(start = 1, fixed = true);
2427
parameter Real a = -1;
2528
equation
2629
der(x) = x*a;
2730
end M;
28-
""")
31+
"""
2932

3033

3134
@pytest.fixture

tests/test_ModelicaSystemCmd.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
import OMPython
21
import pytest
32

3+
import OMPython
4+
45

56
@pytest.fixture
67
def model_firstorder(tmp_path):

tests/test_ModelicaSystemDoE.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1-
import numpy as np
2-
import OMPython
31
import pathlib
4-
import pytest
52
import sys
63

4+
import numpy as np
5+
import pytest
6+
7+
import OMPython
8+
79
skip_on_windows = pytest.mark.skipif(
810
sys.platform.startswith("win"),
911
reason="OpenModelica Docker image is Linux-only; skipping on Windows.",

tests/test_OMCPath.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
import sys
2-
import OMPython
2+
33
import pytest
44

5+
import OMPython
6+
57
skip_on_windows = pytest.mark.skipif(
68
sys.platform.startswith("win"),
79
reason="OpenModelica Docker image is Linux-only; skipping on Windows.",

tests/test_ZMQ.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
import OMPython
21
import pathlib
32
import os
43
import pytest
54

5+
import OMPython
6+
67

78
@pytest.fixture
89
def model_time_str():

tests/test_linearization.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
import OMPython
2-
import pytest
31
import numpy as np
2+
import pytest
3+
4+
import OMPython
45

56

67
@pytest.fixture

tests/test_optimization.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
import OMPython
21
import numpy as np
32

3+
import OMPython
4+
45

56
def test_optimization_example(tmp_path):
67
model_file = tmp_path / "BangBang2021.mo"

0 commit comments

Comments
 (0)