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

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

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

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

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