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')
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()
def testAdd2Python_failure(self): p = Path() self.assertRaises(ImportError, p.add2python, 'kaputttt') self.assertFalse(p.add2python('vdfvdavfdv', must_exist=False))
def testAdd2Python(self): p = Path('/sdjc/scdskjcdnsd/dhjdhjdjksdjksdksd') module = p.add2python('pulsar') self.assertEqual(module.__name__, 'pulsar') self.assertRaises(ValueError, p.add2python, 'kaputttt')
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'])
def testAdd2Python(self): p = Path("/sdjc/scdskjcdnsd/dhjdhjdjksdjksdksd") module = p.add2python("pulsar") self.assertEqual(module.__name__, "pulsar") self.assertRaises(ValueError, p.add2python, "kaputttt")