Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions python/test/test_baseapp.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/usr/bin/env python
# *****************************************************************************
# Copyright (c) 2026 IBM Corporation and other Contributors.
#
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Eclipse Public License v1.0
# which accompanies this distribution, and is available at
# http://www.eclipse.org/legal/epl-v10.html
#
# *****************************************************************************

import os
from mas.cli.cli import BaseApp
from prompt_toolkit.application import create_app_session
from prompt_toolkit.output import DummyOutput


def test_version():
"""
Test that BaseApp.version matches the VERSION environment variable when set
"""
expected_version = "100.0.0-pre.local"
if 'VERSION' in os.environ:
expected_version = os.environ['VERSION']

with create_app_session(output=DummyOutput()):
app = BaseApp()
assert app.version == expected_version, f"Expected version {expected_version}, but got {app.version}"