コード例 #1
0
ファイル: test_log_utils.py プロジェクト: kashefy/nideep
    def test_pid_from_str_invalid_alpha(self):

        n = 26943
        x = ['a%s' % n, '%sa' % n, '269a43']

        for s in x:

            res = lu.pid_from_str(s)
            assert_is_instance(res, int)
            assert_equal(res, -1)
コード例 #2
0
ファイル: test_log_utils.py プロジェクト: kashefy/nideep
    def test_pid_from_str_neg(self):

        n = -26943
        res = lu.pid_from_str('%s' % n)
        assert_is_instance(res, int)
        assert_equal(res, n)
コード例 #3
0
ファイル: test_log_utils.py プロジェクト: wzkg2012/nideep
    def test_pid_from_str(self):

        n = 26943
        res = lu.pid_from_str('%s' % n)
        assert_is_instance(res, int)
        assert_equal(res, n)