<commit_before>import unittest
import numpy as np
import numpy.testing as npt
from pymc3.tests import backend_fixtures as bf
from pymc3.backends import base, ndarray


class TestNDArray0dSampling(bf.SamplingTestCase):
    backend = ndarray.NDArray
    name = None
    shape = ()


class TestNDArray1dSampling(bf.SamplingTestCase):
    backend = ndarray.NDArray
    name = None
    shape = 2


class TestNDArray2dSampling(bf.SamplingTestCase):
    backend = ndarray.NDArray
    name = None
    shape = (2, 3)


class TestNDArray0dSelection(bf.SelectionTestCase):
    backend = ndarray.NDArray
    name = None
    shape = ()


class TestNDArray1dSelection(bf.SelectionTestCase):
    backend = ndarray.NDArray
    name = None
    shape = 2


class TestNDArray2dSelection(bf.SelectionTestCase):
    backend = ndarray.NDArray
    name = None
    shape = (2, 3)


class TestMultiTrace(bf.ModelBackendSetupTestCase):
    name = None
    backend = ndarray.NDArray
    shape = ()

    def setUp(self):
        self.chain = 0
        super(TestMultiTrace, self).setUp()
        self.trace0 = self.trace

        self.chain = 1
        super(TestMultiTrace, self).setUp()
        self.trace1 = self.trace

    def test_multitrace_nonunique(self):
        self.assertRaises(ValueError,
                          base.MultiTrace, [self.trace0, self.trace1])

    def test_merge_traces_nonunique(self):
        mtrace0 = base.MultiTrace([self.trace0])
        mtrace1 = base.MultiTrace([self.trace1])

        self.assertRaises(ValueError,
                          base.merge_traces, [mtrace0, mtrace1])



class TestSqueezeCat(unittest.TestCase):

    def setUp(self):<commit_msg>Remove unnecessary code from ndarray test<commit_after>import unittest
import numpy as np
import numpy.testing as npt
from pymc3.tests import backend_fixtures as bf
from pymc3.backends import base, ndarray


class TestNDArray0dSampling(bf.SamplingTestCase):
    backend = ndarray.NDArray
    name = None
    shape = ()


class TestNDArray1dSampling(bf.SamplingTestCase):
    backend = ndarray.NDArray
    name = None
    shape = 2


class TestNDArray2dSampling(bf.SamplingTestCase):
    backend = ndarray.NDArray
    name = None
    shape = (2, 3)


class TestNDArray0dSelection(bf.SelectionTestCase):
    backend = ndarray.NDArray
    name = None
    shape = ()


class TestNDArray1dSelection(bf.SelectionTestCase):
    backend = ndarray.NDArray
    name = None
    shape = 2


class TestNDArray2dSelection(bf.SelectionTestCase):
    backend = ndarray.NDArray
    name = None
    shape = (2, 3)


class TestMultiTrace(bf.ModelBackendSetupTestCase):
    name = None
    backend = ndarray.NDArray
    shape = ()

    def setUp(self):
        super(TestMultiTrace, self).setUp()
        self.trace0 = self.trace

        super(TestMultiTrace, self).setUp()
        self.trace1 = self.trace

    def test_multitrace_nonunique(self):
        self.assertRaises(ValueError,
                          base.MultiTrace, [self.trace0, self.trace1])

    def test_merge_traces_nonunique(self):
        mtrace0 = base.MultiTrace([self.trace0])
        mtrace1 = base.MultiTrace([self.trace1])

        self.assertRaises(ValueError,
                          base.merge_traces, [mtrace0, mtrace1])



class TestSqueezeCat(unittest.TestCase):

    def setUp(self):
{'fraction_non_alphanumeric': 0.08740204942736589, 'fraction_numerical': 0.015069318866787222, 'mean_word_length': 2.941805225653207, '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': '955905', 'n_tokens_mistral': 1065, 'n_tokens_neox': 1026, 'n_words': 220}