예제 #1
0
def runtests(cov=None, **params):
    import pulsar
    from pulsar.utils.path import Path
    from pulsar.apps.test import TestSuite
    from pulsar.apps.test.plugins import bench, profile
    import pulsar.utils.settings.backend
    #
    path = Path(__file__)
    path.add2python('stdnet', 1, down=['python-stdnet'], must_exist=False)
    strip_dirs = [Path(pulsar.__file__).parent.parent, os.getcwd()]
    #
    suite = TestSuite(description='Pulsar Asynchronous test suite',
                      modules=('tests',
                               ('examples', 'tests'),
                               ('examples', 'test_*')),
                      plugins=(bench.BenchMark(),
                               profile.Profile()),
                      pidfile='test.pid',
                      **params).start()
    #
    if suite.cfg.coveralls:
        from pulsar.utils.cov import coveralls
        coveralls(strip_dirs=strip_dirs,
                  stream=suite.stream,
                  repo_token='CNw6W9flYDDXZYeStmR1FX9F4vo0MKnyX')
예제 #2
0
파일: runtests.py 프로젝트: LoganTK/pulsar
def runtests(**params):
    import pulsar
    from pulsar.utils.path import Path
    from pulsar.apps.test import TestSuite
    from pulsar.apps.test.plugins import bench, profile
    import pulsar.utils.settings.backend
    #
    path = Path(__file__)
    path.add2python('stdnet', 1, down=['python-stdnet'], must_exist=False)
    #
    TestSuite(description='Pulsar Asynchronous test suite',
              modules=('tests',
                       ('examples', 'tests'),
                       ('examples', 'test_*')),
              plugins=(bench.BenchMark(),
                       profile.Profile()),
              pidfile='test.pid',
              **params).start()
예제 #3
0
파일: runtests.py 프로젝트: japaks/pulsar
def runtests(cov=None, **params):
    import pulsar
    from pulsar.utils.path import Path
    from pulsar.apps.test import TestSuite
    from pulsar.apps.test.plugins import bench, profile
    import pulsar.utils.settings.backend
    #
    path = Path(__file__)
    path.add2python('stdnet', 1, down=['python-stdnet'], must_exist=False)
    strip_dirs = [Path(pulsar.__file__).parent.parent, os.getcwd()]
    #
    suite = TestSuite(description='Pulsar Asynchronous test suite',
                      modules=('tests', ('examples', 'tests'), ('examples',
                                                                'test_*')),
                      plugins=(bench.BenchMark(), profile.Profile()),
                      pidfile='test.pid',
                      **params).start()
    #
    if suite.cfg.coveralls:
        from pulsar.utils.cov import coveralls
        coveralls(strip_dirs=strip_dirs,
                  stream=suite.stream,
                  repo_token='CNw6W9flYDDXZYeStmR1FX9F4vo0MKnyX')
예제 #4
0
파일: path.py 프로젝트: Danzeer/pulsar
 def testAdd2Python_failure(self):
     p = Path()
     self.assertRaises(ImportError, p.add2python, 'kaputttt')
     self.assertFalse(p.add2python('vdfvdavfdv', must_exist=False))
예제 #5
0
파일: path.py 프로젝트: Danzeer/pulsar
 def testAdd2Python(self):
     p = Path('/sdjc/scdskjcdnsd/dhjdhjdjksdjksdksd')
     module = p.add2python('pulsar')
     self.assertEqual(module.__name__, 'pulsar')
     self.assertRaises(ValueError, p.add2python, 'kaputttt')
예제 #6
0
파일: devenv.py 프로젝트: pombredanne/lux
import sys
import os
try:
    from pulsar.utils.path import Path
except ImportError:
    # pulsar not available, we are in dev
    path = os.path.join(os.path.dirname(os.getcwd()), 'pulsar')
    if os.path.isdir(path):
        sys.path.append(path)
    from pulsar.utils.path import Path

import lux
path = Path(__file__)
path.add2python('stdnet', up=1, down=['python-stdnet'])
예제 #7
0
파일: path.py 프로젝트: japaks/pulsar
 def testAdd2Python_failure(self):
     p = Path()
     self.assertRaises(ImportError, p.add2python, 'kaputttt')
     self.assertFalse(p.add2python('vdfvdavfdv', must_exist=False))
예제 #8
0
파일: path.py 프로젝트: japaks/pulsar
 def testAdd2Python(self):
     p = Path('/sdjc/scdskjcdnsd/dhjdhjdjksdjksdksd')
     module = p.add2python('pulsar')
     self.assertEqual(module.__name__, 'pulsar')
     self.assertRaises(ValueError, p.add2python, 'kaputttt')
예제 #9
0
파일: path.py 프로젝트: pombredanne/pulsar
 def testAdd2Python(self):
     p = Path("/sdjc/scdskjcdnsd/dhjdhjdjksdjksdksd")
     module = p.add2python("pulsar")
     self.assertEqual(module.__name__, "pulsar")
     self.assertRaises(ValueError, p.add2python, "kaputttt")