Exemple #1
0
    def test_deserialize(self):
        """ Test deserilization of the model

        :return None:
        """
        serialized = encoder.Encoder().serialize()
        assert encoder.Encoder().deserialize(serialized)
Exemple #2
0
    def test_deserialize(self):
        """ Test the deserialization process

        :return None:
        """
        serialized = clusterer.Clusterer(encoder.Encoder()).serialize()
        assert clusterer.Clusterer(encoder.Encoder()).deserialize(serialized)
Exemple #3
0
    def test_init_kwargs(self):
        """ Test the initialization of the Encoder class with kwargs

        :return None:
        """
        kwargs = {'argument': None}
        assert encoder.Encoder(**kwargs)
Exemple #4
0
    def test_train_exception(self, dummy_folder):
        """ Test training on encoder
        Should raise exception on Encoder class

        :return None:
        """
        with pytest.raises(NotImplementedError):
            encoder.Encoder().train(dummy_folder)
Exemple #5
0
    def test_predict(self, dummy_text):
        """ Test predict on the base class
        should raise NotImplementedError

        :return None:
        """
        with pytest.raises(NotImplementedError):
            clusterer.Clusterer(encoder.Encoder()).predict(dummy_text)
Exemple #6
0
    def test_train(self, dummy_folder):
        """ Test train on the base class
        should raise NotImplementedError

        :return None:
        """
        with pytest.raises(NotImplementedError):
            clusterer.Clusterer(encoder.Encoder()).train(dummy_folder)
Exemple #7
0
    def test_init(self):
        """ Test the initialization of the Encoder class

        :return None:
        """
        assert encoder.Encoder()
Exemple #8
0
    def test_serialize(self):
        """ Test serilization of the model

        :return None:
        """
        assert encoder.Encoder().serialize()
Exemple #9
0
    def test_init(self):
        """ Test initialization the class

        :return None:
        """
        assert clusterer.Clusterer(encoder.Encoder())