コード例 #1
0
#!/usr/bin/python

import paths
paths.setup()

import PySkeletonViewer.client
PySkeletonViewer.client.main()
コード例 #2
0
ファイル: store_test.py プロジェクト: danielnorberg/tako
# -*- Mode: Python; tab-width: 4; indent-tabs-mode: nil; -*-

import unittest

import paths
paths.setup()

from tako.store import Store
from tako.utils import testcase
from tako.utils import timestamper

class StoreTest(testcase.TestCase):
    def testStore(self):
        store = Store(filepath = self.tempfile())
        store.open()
        timestamp = timestamper.now()
        store.set("foo", timestamp, "bar")
        self.assertEqual(store.count(), 1)
        self.assertEqual(store.get("foo"), (timestamp, "bar"))
        self.assertEqual(store.get("loo"), (None, None))
        store.close()
        store.open()
        self.assertEqual(store.get("foo"), (timestamp, "bar"))
        self.assertEqual(store.count(), 1)
        store.remove("foo")
        self.assertEqual(store.count(), 0)
        self.assertEqual(store.get("foo"), (None, None))
        store.close()

    def testTransaction(self):
        store = Store(filepath = self.tempfile(), auto_commit_interval=0)
コード例 #3
0
ファイル: setuppaths.py プロジェクト: emreozcan/NepoJang
def call(program, argv):
    paths.setup()