<commit_before>import os

from osgeo import gdal
from osgeo import ogr
from osgeo import osr

# Avoid the regressing from https://github.com/conda-forge/gdal-feedstock/pull/129
# See https://github.com/conda-forge/gdal-feedstock/issues/131
from osgeo.gdal_array import *

# Set GDAL_DATA. This is done normally done by the activate script,
# but this doesn't happen in the testing environment
if 'LIBRARY_PREFIX' in os.environ:
    # Windows.
    gdalData = os.path.join(os.environ['LIBRARY_PREFIX'], 'share', 'gdal')
else:
    # Linux/OS X.
    gdalData = os.path.join(os.environ['PREFIX'], 'share', 'gdal')

os.environ['GDAL_DATA'] = gdalData

driver = gdal.GetDriverByName("netCDF")
assert driver is not None

driver = gdal.GetDriverByName("HDF4")
assert driver is not None

driver = gdal.GetDriverByName("HDF5")
assert driver is not None

driver = gdal.GetDriverByName("GTiff")
assert driver is not None

driver = gdal.GetDriverByName("PNG")<commit_msg>Latest conda activates the env vars properly<commit_after>from osgeo import gdal
from osgeo import ogr
from osgeo import osr

# Avoid the regressing from https://github.com/conda-forge/gdal-feedstock/pull/129
# See https://github.com/conda-forge/gdal-feedstock/issues/131
from osgeo.gdal_array import *

driver = gdal.GetDriverByName("netCDF")
assert driver is not None

driver = gdal.GetDriverByName("HDF4")
assert driver is not None

driver = gdal.GetDriverByName("HDF5")
assert driver is not None

driver = gdal.GetDriverByName("GTiff")
assert driver is not None

driver = gdal.GetDriverByName("PNG")
{'fraction_non_alphanumeric': 0.10705128205128205, 'fraction_numerical': 0.010256410256410256, 'mean_word_length': 4.958015267175573, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5856842', 'n_tokens_mistral': 532, 'n_tokens_neox': 527, 'n_words': 148}