TNO Intern

Commit 6aeb6990 authored by Hen Brett's avatar Hen Brett 🐔
Browse files

Disabling the faulthandler for the tests

parent 6dae8802
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2565,7 +2565,7 @@ packages:
- pypi: .
  name: pythermogis
  version: 0.1.28
  sha256: f6daaa0afaa794067bae1dde1a78ace679f8907984ef70e167cec532d1f45b51
  sha256: 1ca2e51218b8e797c92048075bd6b61ea1cec52999cf47acb88d4fc0fbe325e7
  requires_dist:
  - jpype1>=1.5.2,<2
  - xarray==2024.9.0.*
+0 −3
Original line number Diff line number Diff line
@@ -55,13 +55,10 @@ python = ">=3.13.2,<3.14"
jpype1 = ">=1.5.2,<2"
xarray = "2024.9.0.*"
pandas = ">=2.2.3,<3"
pytz = ">=2024.1,<2025"
setuptools = ">=75.8.2,<76"
wheel = ">=0.45.1,<0.46"
twine = ">=6.1.0,<7"
pip = ">=25.0.1,<26"
sphinx = ">=8.2.3,<9"
sphinx_rtd_theme = ">=3.0.1,<4"
openpyxl = ">=3.1.5,<4"
typer = ">=0.15.4,<0.16"
pytest = ">=8.3.5,<9"
+4 −0
Original line number Diff line number Diff line
@@ -2,6 +2,10 @@ from unittest import TestCase

from pythermogis import *

# when running pytest with jpype a "Windows fatal exception" is thrown which in reality has no affect on the outcome or performance.
# the current workaround from the jpype package is to disable the system faulthandler. (This will not prevent python or java errors in the test).
import faulthandler
faulthandler.disable()

class ThermoGISDoubletBenchmark(TestCase):
    """
+6 −4
Original line number Diff line number Diff line
from os import path
from pathlib import Path

import numpy as np

# when running pytest with jpype a "Windows fatal exception" is thrown which in reality has no affect on the outcome or performance.
# the current workaround from the jpype package is to disable the system faulthandler. (This will not prevent python or java errors in the test).
import faulthandler
faulthandler.disable()


def test_example_1():
    from pythermogis import calculate_doublet_performance
@@ -60,7 +62,7 @@ def test_example_4():
def test_example_5():
    return
    from pythermogis import calculate_doublet_performance
    from pygridsio import read_grid, plot_grid, resample_xarray_grid, remove_padding_from_grid
    from pygridsio import read_grid, plot_grid, resample_xarray_grid
    from matplotlib import pyplot as plt
    import xarray as xr
    from pathlib import Path
+4 −0
Original line number Diff line number Diff line
@@ -6,6 +6,10 @@ from pygridsio import read_grid, resample_xarray_grid

from pythermogis import *

# when running pytest with jpype a "Windows fatal exception" is thrown which in reality has no affect on the outcome or performance.
# the current workaround from the jpype package is to disable the system faulthandler. (This will not prevent python or java errors in the test).
import faulthandler
faulthandler.disable()

class PyThermoGIS(TestCase):
    test_files_path = Path(path.dirname(__file__), "resources") / "test_input" / "example_data"
Loading