Skip to content

D007 define unit test for v4.0.0 compatibility layer#438

Merged
adeas31 merged 8 commits into
OpenModelica:masterfrom
syntron:D007-test_v400
May 11, 2026
Merged

D007 define unit test for v4.0.0 compatibility layer#438
adeas31 merged 8 commits into
OpenModelica:masterfrom
syntron:D007-test_v400

Conversation

@syntron
Copy link
Copy Markdown
Contributor

@syntron syntron commented Feb 27, 2026

this adds a second unittest branch (test_v400) to check for v4.0.0 compatibility

should be merged after D008! (PR #437)

syntron added 3 commits April 30, 2026 22:11
[ModelicaSystemABC] reorder code in __init__()

[ModelicaSystem*] linter fixes
[OMTypedParser] compatibility layer

[__init__/OMCSession] prepare compatibility layer

[ModelicaSystem] define as compatibility layer

[ModelicaSystemCmd] define as compatibility layer
add workflow to run unittests in ./tests

tests from v4.0.0

fix test_linearization from v4.0.0

flake8 error: test_linearization.py:71:5: E741 ambiguous variable name 'l'

this was fixed in: 'update usage of flake8 (OpenModelica#357)' (SHA1: 70cb446)

fix test_ModelicaSystem - needed adaptions:

* convert OMCPath to pathlib.Path
* use correct exceptions

define test workflows for v400
Copy link
Copy Markdown
Member

@adeas31 adeas31 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand why we need new workflows to test v4.0.0?
What is the purpose of Test_v400.yml, Test_v400_py310.yml and Test_v4xx.yml?

We can test bu just adding an extra step,

- name: Run pytest
        uses: pavelzw/pytest-action@v2
        with:
          verbose: true
          emoji: true
          job-summary: true
          custom-arguments: '-v ./tests'
          click-to-expand: true
          report-title: 'Test Report'

- name: Run pytest for v4.0.0
        uses: pavelzw/pytest-action@v2
        with:
          verbose: true
          emoji: true
          job-summary: true
          custom-arguments: '-v ./tests_v400'
          click-to-expand: true
          report-title: 'Test Report'

@syntron
Copy link
Copy Markdown
Contributor Author

syntron commented May 6, 2026

I don't understand why we need new workflows to test v4.0.0? What is the purpose of Test_v400.yml, Test_v400_py310.yml and Test_v4xx.yml?

We can test bu just adding an extra step,

- name: Run pytest
[...]
- name: Run pytest for v4.0.0
[...]

Quite right; I tested it for myself using the different workflows to activate them as needed with corresponding settings. Would you prefere an update according to this proposal?

@syntron
Copy link
Copy Markdown
Contributor Author

syntron commented May 6, 2026

updated PR - however, this will increase the time to run the unittests (factor 2?)

@adeas31
Copy link
Copy Markdown
Member

adeas31 commented May 6, 2026

I don't understand why we need new workflows to test v4.0.0? What is the purpose of Test_v400.yml, Test_v400_py310.yml and Test_v4xx.yml?
We can test bu just adding an extra step,

- name: Run pytest
[...]
- name: Run pytest for v4.0.0
[...]

Quite right; I tested it for myself using the different workflows to activate them as needed with corresponding settings. Would you prefere an update according to this proposal?

Yes please. We might remove v4.0.0 tests in future.

@syntron
Copy link
Copy Markdown
Contributor Author

syntron commented May 6, 2026

It fails here but should work on top of latest master (see also test in my fork: https://github.com/syntron/OMPython/actions/runs/25456426602) - updated with the fix included

Comment thread .github/workflows/Test.yml Outdated
@adeas31
Copy link
Copy Markdown
Member

adeas31 commented May 7, 2026

It fails here but should work on top of latest master (see also test in my fork: https://github.com/syntron/OMPython/actions/runs/25456426602) - updated with the fix included

I don't get it. Why does it timeout here?
So your suggestion is to merge it even if this test fails?
This is already rebased on the master so I wonder how does it work on top of master.

@syntron
Copy link
Copy Markdown
Contributor Author

syntron commented May 7, 2026

It fails here but should work on top of latest master (see also test in my fork: https://github.com/syntron/OMPython/actions/runs/25456426602) - updated with the fix included

I don't get it. Why does it timeout here? So your suggestion is to merge it even if this test fails? This is already rebased on the master so I wonder how does it work on top of master.

Sorry; my wrong in the comment ...

(1) running the unittests twice (master+ v4.0.0) will increase time needed and , thus, the timeout could come
(2) in the first version I used a wrong name for the test-directory and therefore, the test in this PR failed
(3) the test in this PR will fail as it needs changes which are not in this branch but in master

I fixed the bug (see 2) and will not update the title to make it more specific

@adeas31 adeas31 enabled auto-merge (squash) May 11, 2026 11:22
@adeas31 adeas31 disabled auto-merge May 11, 2026 13:35
@adeas31 adeas31 enabled auto-merge (squash) May 11, 2026 14:01
@adeas31 adeas31 disabled auto-merge May 11, 2026 14:12
@adeas31 adeas31 enabled auto-merge (squash) May 11, 2026 14:53
@adeas31 adeas31 merged commit 198ab3d into OpenModelica:master May 11, 2026
10 checks passed
@syntron syntron deleted the D007-test_v400 branch May 11, 2026 16:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants