<commit_before>import unittest

from jute import Interface, Dynamic


class Iterable(Interface):

    def __iter__(self):
        """Interface for an iterable."""


class Iterator(Iterable):

    def __next__(self):
        """Interface for an iterator."""


class IterTestMixin:

    def get_test_object(self):
        return object()

    def test_next(self):
        iterator = self.get_test_object()
        self.assertEqual(next(iterator), 0)

    def test_getattr(self):
        iterator = self.get_test_object()
        self.assertEqual(getattr(iterator, '__next__')(), 0)

    def test_attribute(self):<commit_msg>Remove subclass link between Iterable and Iterator.<commit_after>import unittest

from jute import Interface, Dynamic


# Note that an Iterator is a syntactic sub-class of Iterable, but it is
# not (necessarily) a semantic sub-class.  Although there is no absolute
# rule, an iterator is usually a non-restartable "input iterator", while
# an iterable is a restartable "forward iterator".  In general, neither
# of them can be used in all code that works with the other.

class Iterable(Interface):

    def __iter__(self):
        """Get an iterator."""


class Iterator(Interface):

    def __iter__(self):
        """Handle for loops."""

    def __next__(self):
        """Get the next item."""


class IterTestMixin:

    def get_test_object(self):
        return object()

    def test_next(self):
        iterator = self.get_test_object()
        self.assertEqual(next(iterator), 0)

    def test_getattr(self):
        iterator = self.get_test_object()
        self.assertEqual(getattr(iterator, '__next__')(), 0)

    def test_attribute(self):
{'fraction_non_alphanumeric': 0.1027479091995221, 'fraction_numerical': 0.0023894862604540022, 'mean_word_length': 3.3619791666666665, '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': '911779', 'n_tokens_mistral': 498, 'n_tokens_neox': 469, 'n_words': 153}