def test_more_logging_tests(caplog): """Testing on the logging levels, see that ENV variable will override the basiclogger setting. """ os.environ['XTG_LOGGING_LEVEL'] = 'INFO' xtgmore = XTGeoDialog() # another instance locallogger = xtgmore.basiclogger(__name__, logginglevel='WARNING') locallogger.debug('Display debug') locallogger.info('Display info') locallogger.warning('Display warning') locallogger.critical('Display critical')
def test_more_logging_tests(caplog): """Testing on the logging levels, see that ENV variable will override the basiclogger setting. """ os.environ["XTG_LOGGING_LEVEL"] = "INFO" xtgmore = XTGeoDialog() # another instance locallogger = xtgmore.basiclogger(__name__, logginglevel="WARNING") locallogger.debug("Display debug") locallogger.info("Display info") locallogger.warning("Display warning") locallogger.critical("Display critical")
from __future__ import print_function import os from os.path import join import io import threading import base64 import pytest import xtgeo from xtgeo.common import XTGeoDialog import test_common.test_xtg as tsetup xtg = XTGeoDialog() logger = xtg.basiclogger(__name__) if not xtg.testsetup(): raise SystemExit TMPD = xtg.tmpdir TPATH = xtg.testpath XTGSHOW = False if "XTG_SHOW" in os.environ: XTGSHOW = True # ============================================================================= # Do tests # =============================================================================
import math import pytest import numpy as np import test_common.test_xtg as tsetup import xtgeo from xtgeo import pathlib from xtgeo.grid3d import Grid from xtgeo.grid3d import GridProperty from xtgeo.common import XTGeoDialog xtg = XTGeoDialog() logger = xtg.basiclogger(__name__, info=True) if not xtg.testsetup(): raise SystemExit TMPDIR = xtg.tmpdir TESTPATH = xtg.testpath EMEGFILE = "../xtgeo-testdata/3dgrids/eme/1/emerald_hetero_grid.roff" REEKFILE = "../xtgeo-testdata/3dgrids/reek/REEK.EGRID" REEKFIL2 = "../xtgeo-testdata/3dgrids/reek3/reek_sim.grdecl" # ASCII GRDECL REEKFIL3 = "../xtgeo-testdata/3dgrids/reek3/reek_sim.bgrdecl" # binary GRDECL REEKFIL4 = "../xtgeo-testdata/3dgrids/reek/reek_geo_grid.roff" REEKFIL5 = "../xtgeo-testdata/3dgrids/reek/reek_geo2_grid_3props.roff" REEKROOT = "../xtgeo-testdata/3dgrids/reek/REEK" # brilfile = '../xtgeo-testdata/3dgrids/bri/B.GRID' ...disabled