<commit_before># Copyright (c) Jupyter Development Team.
# Distributed under the terms of the Modified BSD License.

"""Test Image widget"""

import io
import os

from ipywidgets import Image

import hashlib

import nose.tools as nt

import pkgutil

import tempfile
from contextlib import contextmanager

# Data
@contextmanager
def get_logo_png():
    # Once the tests are not in the package, this context manager can be
    # replaced with the location of the actual file
    LOGO_DATA = pkgutil.get_data('ipywidgets.widgets.tests',
                                 'data/jupyter-logo-transparent.png')
    handle, fname = tempfile.mkstemp()
    os.close(handle)
    with open(fname, 'wb') as f:
        f.write(LOGO_DATA)

    yield fname

    os.remove(fname)

LOGO_PNG_DIGEST = '3ff9eafd7197083153e83339a72e7a335539bae189c33554c680e4382c98af02'


def test_empty_image():<commit_msg>Delete nose import<commit_after># Copyright (c) Jupyter Development Team.
# Distributed under the terms of the Modified BSD License.

"""Test Image widget"""

import io
import os

from ipywidgets import Image

import hashlib

import pkgutil

import tempfile
from contextlib import contextmanager

# Data
@contextmanager
def get_logo_png():
    # Once the tests are not in the package, this context manager can be
    # replaced with the location of the actual file
    LOGO_DATA = pkgutil.get_data('ipywidgets.widgets.tests',
                                 'data/jupyter-logo-transparent.png')
    handle, fname = tempfile.mkstemp()
    os.close(handle)
    with open(fname, 'wb') as f:
        f.write(LOGO_DATA)

    yield fname

    os.remove(fname)

LOGO_PNG_DIGEST = '3ff9eafd7197083153e83339a72e7a335539bae189c33554c680e4382c98af02'


def test_empty_image():
{'fraction_non_alphanumeric': 0.07363013698630137, 'fraction_numerical': 0.05136986301369863, 'mean_word_length': 3.62532981530343, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1780182', 'n_tokens_mistral': 640, 'n_tokens_neox': 568, 'n_words': 167}