# Path: preimage/datasets/loader.py
# class StructuredOutputDataset:
# class StandardDataset:
#     def __init__(self, X, Y):
#     def __init__(self, X, y):
# def load_ocr_letters(fold_id=0):
# def __load_gz_pickle_file(file_name):
# def load_camps_dataset():
# def load_bpps_dataset():
# def __load_peptide_dataset(file_name):
# def __load_pickle_file(file_name):
# def load_amino_acids_and_descriptors(file_name=AminoAcidFile.blosum62_natural):
#     X = numpy.array(data['X'], dtype=numpy.str)


import numpy
import unittest2
from preimage.datasets import loader
    def test_load_camps_dataset_has_correct_number_of_x(self):
        dataset = loader.load_camps_dataset()
        n_examples = dataset.X.shape[0]

        self.assertEqual(n_examples, self.camps_n_examples)

    def test_load_camps_dataset_has_correct_number_of_y(self):
        dataset = loader.load_camps_dataset()
        n_examples = dataset.y.shape[0]

        self.assertEqual(n_examples, self.camps_n_examples)

    def test_load_bpps_dataset_has_correct_number_of_x(self):
        dataset = loader.load_bpps_dataset()
        n_examples = dataset.X.shape[0]

        self.assertEqual(n_examples, self.bpps_n_examples)

    def test_load_bpps_dataset_has_correct_number_of_y(self):
        dataset = loader.load_bpps_dataset()
        n_examples = dataset.y.shape[0]

        self.assertEqual(n_examples, self.bpps_n_examples)

    def test_load_amino_acids_returns_expected_amino_acids(self):
        amino_acids, descriptors = loader.load_amino_acids_and_descriptors(self.amino_acid_file)

        numpy.testing.assert_array_equal(amino_acids, self.amino_acids)

    def test_load_amino_acid_descriptors_returns_expected_descriptors(self):

# Path: preimage/datasets/loader.py
# class StructuredOutputDataset:
# class StandardDataset:
#     def __init__(self, X, Y):
#     def __init__(self, X, y):
# def load_ocr_letters(fold_id=0):
# def __load_gz_pickle_file(file_name):
# def load_camps_dataset():
# def load_bpps_dataset():
# def __load_peptide_dataset(file_name):
# def __load_pickle_file(file_name):
# def load_amino_acids_and_descriptors(file_name=AminoAcidFile.blosum62_natural):
#     X = numpy.array(data['X'], dtype=numpy.str)


# Path: preimage/tests/datasets/test_loader.py
import numpy
import unittest2
from preimage.datasets import loader

    def test_load_camps_dataset_has_correct_number_of_x(self):
        dataset = loader.load_camps_dataset()
        n_examples = dataset.X.shape[0]

        self.assertEqual(n_examples, self.camps_n_examples)

    def test_load_camps_dataset_has_correct_number_of_y(self):
        dataset = loader.load_camps_dataset()
        n_examples = dataset.y.shape[0]

        self.assertEqual(n_examples, self.camps_n_examples)

    def test_load_bpps_dataset_has_correct_number_of_x(self):
        dataset = loader.load_bpps_dataset()
        n_examples = dataset.X.shape[0]

        self.assertEqual(n_examples, self.bpps_n_examples)

    def test_load_bpps_dataset_has_correct_number_of_y(self):
        dataset = loader.load_bpps_dataset()
        n_examples = dataset.y.shape[0]

        self.assertEqual(n_examples, self.bpps_n_examples)

    def test_load_amino_acids_returns_expected_amino_acids(self):
        amino_acids, descriptors = loader.load_amino_acids_and_descriptors(self.amino_acid_file)

        numpy.testing.assert_array_equal(amino_acids, self.amino_acids)

    def test_load_amino_acid_descriptors_returns_expected_descriptors(self):

        amino_acids, descriptors = loader.load_amino_acids_and_descriptors(self.amino_acid_file)