Skip to content

Commit

Permalink
Add gui pickling test, update poetry.lock
Browse files Browse the repository at this point in the history
  • Loading branch information
julianneswinoga committed Jun 4, 2023
1 parent bcafb48 commit cd0ed18
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 11 deletions.
18 changes: 9 additions & 9 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 11 additions & 2 deletions tests/test_pickling.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"""
import dill

from flightgear_python.fg_if import FDMConnection, CtrlsConnection
from testing_common import supported_fdm_versions, supported_ctrls_versions
from flightgear_python.fg_if import FDMConnection, CtrlsConnection, GuiConnection
from testing_common import supported_fdm_versions, supported_ctrls_versions, supported_gui_versions

import pytest
from _pytest.outcomes import Failed
Expand All @@ -28,3 +28,12 @@ def test_pickle_ctrls(ctrls_version):
dill.dumps(ctrls_c.fg_net_struct)
except dill.PicklingError as e:
raise Failed(f'Failed to pickle Ctrls fg_net_struct: {e}') from None


@pytest.mark.parametrize('gui_version', supported_gui_versions)
def test_pickle_gui(gui_version):
gui_c = GuiConnection(gui_version)
try:
dill.dumps(gui_c.fg_net_struct)
except dill.PicklingError as e:
raise Failed(f'Failed to pickle Gui fg_net_struct: {e}') from None
1 change: 1 addition & 0 deletions tests/testing_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

supported_fdm_versions = [24, 25, ]
supported_ctrls_versions = [27, ]
supported_gui_versions = [8, ]


project_dir = os.path.abspath(os.path.dirname(__file__))
Expand Down

0 comments on commit cd0ed18

Please sign in to comment.