HEX
Server: Apache
System: Linux 185.122.168.184.host.secureserver.net 5.14.0-570.60.1.el9_6.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Nov 5 05:00:59 EST 2025 x86_64
User: barbeatleanalyti (1024)
PHP: 8.1.33
Disabled: NONE
Upload Files
File: //lib/fm-agent/dependencies/linux/python3.13/jpype/_pyinstaller/test_jpype_pyinstaller.py
import os
from pathlib import Path
from subprocess import run

import jpype
import PyInstaller.__main__


fspath = getattr(os, 'fspath', str)


example_path = Path(__file__).parent.joinpath('example.py')


def test_start_and_stop(tmp_path):
    name = 'e'
    dist = tmp_path.joinpath('dist')
    work = tmp_path.joinpath('build')
    result = dist.joinpath(name, name)

    PyInstaller.__main__.run([
        '--name',
        name,
        '--distpath',
        fspath(dist),
        '--workpath',
        fspath(work),
        fspath(example_path),
    ])

    run([fspath(result)], check=True, cwd=fspath(tmp_path))