Ejemplo n.º 1
0
    def test_deserialize(self):
        """ Test deserilization of the model

        :return None:
        """
        serialized = encoder.Encoder().serialize()
        assert encoder.Encoder().deserialize(serialized)
Ejemplo n.º 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)
Ejemplo n.º 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)
Ejemplo n.º 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)
Ejemplo n.º 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)
Ejemplo n.º 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)
Ejemplo n.º 7
0
    def test_init(self):
        """ Test the initialization of the Encoder class

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

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

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