def test_deserialize(self): """ Test deserilization of the model :return None: """ serialized = encoder.Encoder().serialize() assert encoder.Encoder().deserialize(serialized)
def test_deserialize(self): """ Test the deserialization process :return None: """ serialized = clusterer.Clusterer(encoder.Encoder()).serialize() assert clusterer.Clusterer(encoder.Encoder()).deserialize(serialized)
def test_init_kwargs(self): """ Test the initialization of the Encoder class with kwargs :return None: """ kwargs = {'argument': None} assert encoder.Encoder(**kwargs)
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)
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)
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)
def test_init(self): """ Test the initialization of the Encoder class :return None: """ assert encoder.Encoder()
def test_serialize(self): """ Test serilization of the model :return None: """ assert encoder.Encoder().serialize()
def test_init(self): """ Test initialization the class :return None: """ assert clusterer.Clusterer(encoder.Encoder())