コード例 #1
0
ファイル: tests.py プロジェクト: phantez/katal
    def test__fill_select2(self):
        """
		Tests.test__fill_select2()

		Test of the katal.py::fill_select() function.
        """
        katal.ARGS.configfile = os.path.join("tests", "cfgfile2.ini")
        katal.PARAMETERS = katal.read_parameters_from_cfgfile(katal.ARGS.configfile)
        katal.read_sieves()
        katal.fill_select()

        self.assertEqual(len(katal.SELECT), 1)

        hashid = "O2TblctVx2M5HHBxCEia4YtBEteDMA3jjgM7TJjD3q8="
        self.assertTrue(hashid in katal.SELECT)
コード例 #2
0
ファイル: tests.py プロジェクト: phantez/katal
    def test__fill_select4(self):
        """
		Tests.test__fill_select4()

		Test of the katal.py::fill_select() function.
        """
        katal.ARGS.configfile = os.path.join("tests", "cfgfile4.ini")
        katal.PARAMETERS = katal.read_parameters_from_cfgfile(katal.ARGS.configfile)
        katal.read_sieves()
        katal.fill_select()

        self.assertEqual(len(katal.SELECT), 1)

        hashid = "47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU="
        self.assertTrue(hashid in katal.SELECT)
        self.assertTrue(katal.SELECT[hashid].fullname, "ddddd.6")
コード例 #3
0
ファイル: tests.py プロジェクト: ytterbium/katal
    def test__fill_select1(self):
        """
		Tests.test__fill_select1()

		Test of the katal.py::fill_select() function.
        """
        katal.ARGS.configfile = os.path.join("tests", "cfgfile1.ini")
        katal.CFG_PARAMETERS = katal.read_parameters_from_cfgfile(katal.ARGS.configfile)
        katal.SOURCE_PATH = os.path.join("tests", "data1")
        katal.read_filters()
        katal.fill_select()

        self.assertEqual(len(katal.SELECT), 1)

        # hashid of b.2 :
        hashid = list(katal.SELECT.keys())[0]
        self.assertTrue(katal.SELECT[hashid].fullname, "b.2")
コード例 #4
0
ファイル: tests.py プロジェクト: ytterbium/katal
    def test__fill_select4(self):
        """
		Tests.test__fill_select4()

		Test of the katal.py::fill_select() function.
        """
        katal.ARGS.configfile = os.path.join("tests", "cfgfile4.ini")
        katal.CFG_PARAMETERS = katal.read_parameters_from_cfgfile(katal.ARGS.configfile)
        katal.SOURCE_PATH = os.path.join("tests", "data1")
        katal.read_filters()
        katal.fill_select()

        self.assertEqual(len(katal.SELECT), 1)

        # hashid of ddddd.6 = ddddX.6
        hashid = "47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU="
        self.assertTrue(hashid in katal.SELECT)
コード例 #5
0
ファイル: tests.py プロジェクト: phantez/katal
    def test__fill_select3(self):
        """
		Tests.test__fill_select3()

		Test of the katal.py::fill_select() function.
        """
        katal.ARGS.configfile = os.path.join("tests", "cfgfile3.ini")
        katal.PARAMETERS = katal.read_parameters_from_cfgfile(katal.ARGS.configfile)
        katal.read_sieves()
        katal.fill_select()

        self.assertEqual(len(katal.SELECT), 2)

        hashid = "47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU="
        self.assertTrue(hashid in katal.SELECT)

        hashid = "rc2y98HRxM0xEpm9nouE60nVk4TUq3ec9sr10UEwpnY="
        self.assertTrue(hashid in katal.SELECT)
コード例 #6
0
ファイル: tests.py プロジェクト: phantez/katal
    def test__fill_select7(self):
        """
		Tests.test__fill_select7()

		Test of the katal.py::fill_select() function.
        """
        katal.ARGS.configfile = os.path.join("tests", "cfgfile7.ini")
        katal.PARAMETERS = katal.read_parameters_from_cfgfile(katal.ARGS.configfile)
        katal.SOURCE_PATH = os.path.join("tests", "data1")
        katal.read_sieves()
        katal.fill_select({katal.normpath("tests/data1/a.0"):"2013-01-01 00:00",
                           katal.normpath("tests/data1/a.1"):"2013-01-01 00:00",
                           katal.normpath("tests/data1/b.2"):"2014-01-01 00:00",
                           katal.normpath("tests/data1/b.3"):"2014-01-01 00:00",
                           katal.normpath("tests/data1/c.4"):"2015-01-01 00:00",
                           katal.normpath("tests/data1/c.5"):"2015-01-01 00:00",
                           katal.normpath("tests/data1/ddddX.6"):"2015-09-01 00:00",
                           katal.normpath("tests/data1/ddddd.6"):"2015-09-01 00:00",})

        self.assertEqual(len(katal.SELECT), 3)
コード例 #7
0
ファイル: tests.py プロジェクト: ytterbium/katal
    def test__fill_select3(self):
        """
		Tests.test__fill_select3()

		Test of the katal.py::fill_select() function.
        """
        katal.ARGS.configfile = os.path.join("tests", "cfgfile3.ini")
        katal.CFG_PARAMETERS = katal.read_parameters_from_cfgfile(katal.ARGS.configfile)
        katal.SOURCE_PATH = os.path.join("tests", "data1")
        katal.read_filters()
        katal.fill_select()

        # hashid of C.5 :
        hashid = "11TnbVxzyXGjz0LwAjC804And9dqVLWcFUJxApkS12I="
        self.assertTrue(hashid in katal.SELECT)

        # hashid of c.5 == c.4
        hashid = "rc2y98HRxM0xEpm9nouE60nVk4TUq3ec9sr10UEwpnY="
        self.assertTrue(hashid in katal.SELECT)

        # hashid of a.1 == a.0
        hashid = "47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU="
        self.assertTrue(hashid in katal.SELECT)
コード例 #8
0
ファイル: tests.py プロジェクト: ytterbium/katal
    def test__fill_select5(self):
        """
		Tests.test__fill_select5()

		Test of the katal.py::fill_select() function.
        """
        katal.ARGS.configfile = os.path.join("tests", "cfgfile5.ini")
        katal.CFG_PARAMETERS = katal.read_parameters_from_cfgfile(katal.ARGS.configfile)
        katal.SOURCE_PATH = os.path.join("tests", "data1")
        katal.read_filters()
        katal.fill_select()

        #for k in katal.SELECT:
        #    print(k, katal.SELECT[k].fullname)

        self.assertEqual(len(katal.SELECT), 2)

        # hashid of c.5 == c.4 :
        hashid = "rc2y98HRxM0xEpm9nouE60nVk4TUq3ec9sr10UEwpnY="
        self.assertTrue(hashid in katal.SELECT)

        # hashid of C.5 :
        hashid = "11TnbVxzyXGjz0LwAjC804And9dqVLWcFUJxApkS12I="
        self.assertTrue(hashid in katal.SELECT)