Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(16)  |  Call(11)  |  Derive(1)  |  Import(4)

src/s/k/skdb-HEAD/web/web.py   skdb(Download)
class Package(PackageView, skdb.Package):
    _cp_config = {'request.error_response': handle_error}
    exposed=True
    package = None
    def __init__(self, package):
        if not (name in cls._packages):
            if skdb.check_unix_name(name):
                new_package = skdb.Package(name=name, create=False)
                new_package_page = Package(new_package)
                cls._packages.append(new_package_page)

src/s/k/skdb-HEAD/tests/test_mating.py   skdb(Download)
import unittest, math
from skdb.geom import *
from skdb import load_package, Package, close_enough
class TestMating(unittest.TestCase):
    def test_part_mating(self):
        pass
        lego_pack = Package("lego")
    def test_lego_volume(self):
        pack = Package("lego")
        round_brick_volume = shape_volume(pack.parts[0].shapes[0])
        self.assertEqual(round(round_brick_volume), 865)
 

src/s/k/skdb-HEAD/tests/test_parser.py   skdb(Download)
#!/usr/bin/python
from pyparsing import Word, alphas, operatorPrecedence, opAssoc, ParseException
from skdb import Package
import unittest
import functools
    def test_basic(self):
        packages = [Package("foo123"), Package("bar123"), Package("narf"), Package("foo123foo")]
 
        query_0 = "have foo123"
        self.assertTrue(parse(query_0, data=packages))

src/s/k/skdb-HEAD/tests/test_units.py   skdb(Download)
    def test_conversions(self):
            screw_package = skdb.Package("screw")
            screw1 = screw_package.parts[0]
            #screw1 = skdb.load(skdb.package_file('screw', 'data.yaml'))['parts'][0]
            self.assertEqual(screw1.thread.clamping_force('20N*m/rev'), '354.02982*lbf')

src/s/k/skdb-HEAD/tests/test_gui.py   skdb(Download)
import unittest, math
from skdb.geom import *
from skdb import load_package, Package, close_enough
 
#well, i dunno how to verify these except by looking

src/s/k/skdb-HEAD/tests/test_geom.py   skdb(Download)
import unittest, math
from skdb.geom import *
from skdb import load_package, Package, close_enough
 
#for test_shape_volume