<commit_before>from puzzle.constraints import constraints, validator
from puzzle.puzzlepedia import annotation_widget
from spec.mamba import *


widget_patch = mock.patch('puzzle.puzzlepedia.annotation_widget.widgets')


class TestConstraints(constraints.Constraints):
  pass


with description('annotation_widget'):
  with before.each:
    self.mock_widgets = widget_patch.start()

  with after.each:
    widget_patch.stop()

  with it('renders NumberInRange as a FloatSlider'):
    annotation_widget.AnnotationWidget(
        validator.NumberInRange(0.0, 2.0), TestConstraints(), 'test', 1.0)
    expect(self.mock_widgets.FloatSlider).to(have_been_called)<commit_msg>Updates test to include required capture argument.<commit_after>from puzzle.constraints import constraints, validator
from puzzle.puzzlepedia import annotation_widget
from spec.mamba import *


widget_patch = mock.patch('puzzle.puzzlepedia.annotation_widget.widgets')


class TestConstraints(constraints.Constraints):
  pass


with description('annotation_widget'):
  with before.each:
    self.mock_widgets = widget_patch.start()

  with after.each:
    widget_patch.stop()

  with it('renders NumberInRange as a FloatSlider'):
    annotation_widget.AnnotationWidget(
        validator.NumberInRange(0.0, 2.0), TestConstraints(), 'test', 1.0,
        mock.Mock())
    expect(self.mock_widgets.FloatSlider).to(have_been_called)
{'fraction_non_alphanumeric': 0.0995702005730659, 'fraction_numerical': 0.008595988538681949, 'mean_word_length': 5.292792792792793, '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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3827089', 'n_tokens_mistral': 432, 'n_tokens_neox': 402, 'n_words': 84}