本文整理匯總了Python中setup.VERSION屬性的典型用法代碼示例。如果您正苦於以下問題:Python setup.VERSION屬性的具體用法?Python setup.VERSION怎麽用?Python setup.VERSION使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在類setup
的用法示例。
在下文中一共展示了setup.VERSION屬性的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: test_version
# 需要導入模塊: import setup [as 別名]
# 或者: from setup import VERSION [as 別名]
def test_version(self):
"""
Test that setup.py's version matches the package's version.
"""
original_path = list(sys.path)
sys.path.insert(0, self.project_dir)
try:
from setup import VERSION
self.assertEqual(VERSION, pystache.__version__)
finally:
sys.path = original_path
示例2: parse_args
# 需要導入模塊: import setup [as 別名]
# 或者: from setup import VERSION [as 別名]
def parse_args():
opts = docopt(__doc__, version='.'.join(VERSION))
schema = Schema({
Optional('PACK_TYPE'):
Or(None, lambda s: s.lower() in PACKS_TYPE,
error="PACK_TYPE should be either %s" % (', '.join(PACKS_TYPE))),
Optional('--config'):
Or(None, Use(open),
error="--config must be a readable file"),
Optional('--attempts'):
And(Use(int), lambda n: n > 0,
error='--attempts must be a strictly positive integer'),
Optional('--score'):
And(Use(int),
error='--score must be an integer'),
Optional('--threshold'):
And(Use(int), lambda n: n >= 0,
error='--threshold must be a positive integer'),
Optional('--low-threshold'):
And(Use(int), lambda n: n > 0,
error='--low-threshold must be a strictly positive integer'),
Optional('--wait'):
And(Use(int), lambda n: n >= 0,
error='--wait must be a positive integer'),
object: object,
})
opts = schema.validate(opts)
opts['PACK_TYPE'] = opts['PACK_TYPE'].lower() if opts['PACK_TYPE'] else "wild"
if opts['--config']:
config = simplejson.loads(opts['--config'].read())
opts.update(config)
return opts
示例3: test_version
# 需要導入模塊: import setup [as 別名]
# 或者: from setup import VERSION [as 別名]
def test_version(self):
import setup
self.assertEqual(fatoptimizer.__version__, setup.VERSION)
示例4: test_version_tuple
# 需要導入模塊: import setup [as 別名]
# 或者: from setup import VERSION [as 別名]
def test_version_tuple(self):
self.assertIsInstance(perf.VERSION, tuple)
self.assertTrue(all(isinstance(part, int) for part in perf.VERSION),
perf.VERSION)
示例5: test_version_str
# 需要導入模塊: import setup [as 別名]
# 或者: from setup import VERSION [as 別名]
def test_version_str(self):
self.assertIsInstance(perf.__version__, str)
self.assertEqual(perf.__version__,
'.'.join(str(part) for part in perf.VERSION))
示例6: test_setup_version
# 需要導入模塊: import setup [as 別名]
# 或者: from setup import VERSION [as 別名]
def test_setup_version(self):
import setup
self.assertEqual(perf.__version__, setup.VERSION)
示例7: test_version
# 需要導入模塊: import setup [as 別名]
# 或者: from setup import VERSION [as 別名]
def test_version(self):
import setup
self.assertEqual(bytecode.__version__, setup.VERSION)