Exemple #1
0
    def test_configuration(self):
        c = LibSvmHikRelevancyIndex.get_default_config()
        ntools.assert_in("descr_cache_filepath", c)

        # change default for something different
        c["descr_cache_filepath"] = "foobar.thing"

        iqr_index = LibSvmHikRelevancyIndex.from_config(c)
        ntools.assert_equal(iqr_index._descr_cache_fp, c["descr_cache_filepath"])

        # test config idempotency
        ntools.assert_dict_equal(c, iqr_index.get_config())
Exemple #2
0
    def test_configuration(self):
        c = LibSvmHikRelevancyIndex.get_default_config()
        ntools.assert_in('descr_cache_filepath', c)

        # change default for something different
        c['descr_cache_filepath'] = 'foobar.thing'

        iqr_index = LibSvmHikRelevancyIndex.from_config(c)
        ntools.assert_equal(iqr_index._descr_cache_fp,
                            c['descr_cache_filepath'])

        # test config idempotency
        ntools.assert_dict_equal(c, iqr_index.get_config())
Exemple #3
0
        def test_configuration(self):
            c = LibSvmHikRelevancyIndex.get_default_config()
            self.assertIn('descr_cache_filepath', c)

            # change default for something different
            c['descr_cache_filepath'] = 'foobar.thing'

            #: :type: LibSvmHikRelevancyIndex
            iqr_index = LibSvmHikRelevancyIndex.from_config(c)
            self.assertEqual(iqr_index.descr_cache_fp,
                             c['descr_cache_filepath'])

            # test config idempotency
            self.assertDictEqual(c, iqr_index.get_config())
Exemple #4
0
        def test_configuration(self):
            c = LibSvmHikRelevancyIndex.get_default_config()
            self.assertIn('descr_cache_filepath', c)

            # change default for something different
            c['descr_cache_filepath'] = 'foobar.thing'

            #: :type: LibSvmHikRelevancyIndex
            iqr_index = LibSvmHikRelevancyIndex.from_config(c)
            self.assertEqual(iqr_index.descr_cache_fp,
                             c['descr_cache_filepath'])

            # test config idempotency
            self.assertDictEqual(c, iqr_index.get_config())