<commit_before>import unittest
from nose import SkipTest

from rx import Observable
from rx.testing import TestScheduler, ReactiveTest

from transducer.functional import compose
from transducer.react import transduce
from transducer.transducers import (mapping, filtering, reducing)

on_next = ReactiveTest.on_next
on_completed = ReactiveTest.on_completed
on_error = ReactiveTest.on_error
subscribe = ReactiveTest.subscribe
subscribed = ReactiveTest.subscribed
disposed = ReactiveTest.disposed
created = ReactiveTest.created


def even(x):
    return x % 2 == 0
<commit_msg>Skip test if no transducers<commit_after>import unittest
from nose import SkipTest

from rx import Observable
from rx.testing import TestScheduler, ReactiveTest

try:
    from transducer.functional import compose
    from transducer.react import transduce
    from transducer.transducers import (mapping, filtering, reducing)
except ImportError:
    raise SkipTest("Transducers not available")

on_next = ReactiveTest.on_next
on_completed = ReactiveTest.on_completed
on_error = ReactiveTest.on_error
subscribe = ReactiveTest.subscribe
subscribed = ReactiveTest.subscribed
disposed = ReactiveTest.disposed
created = ReactiveTest.created


def even(x):
    return x % 2 == 0

{'fraction_non_alphanumeric': 0.056134723336006415, 'fraction_numerical': 0.0032076984763432237, 'mean_word_length': 5.782608695652174, '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': '2543837', 'n_tokens_mistral': 372, 'n_tokens_neox': 339, 'n_words': 109}