def main(args=None): global base args = parser.parse_args(args) base = os.getcwd() if args.dir: base = args.dir if args.command[0] == "sanity": auditfiles() auditsetup() elif args.command[0] == "style": auditstyle() elif args.command[0] == "test": nose() elif args.command[0] == "test-all": import tox tox.cmdline(("-c", os.path.join(base, "tox.ini"))) elif args.command[0] == "publish": printer.info("Going to run sanity checks and tests first") auditfiles() packagename, packageversion = auditsetup() auditstyle() nose() publish(packagename, packageversion) exit(0)
def run(self): try: import tox except ImportError: import sys sys.exit("tox is required to run tests. $ pip install tox") tox.cmdline()
def main(argv): if len(argv) == 1: print('Usage: {0} GEN_PATH [TOX_ARGS...]', file=sys.stderr) # Get the project root directory. project_root = os.path.dirname(os.path.dirname( os.path.realpath(__file__))) temp_dir = argv[1] print('Copying files to ', temp_dir) shutil.copytree(project_root, temp_dir) os.chdir(temp_dir) # Run generation. sys.path.insert(0, os.path.realpath('internal')) import generate generate.main() # Run tox. import tox # tox will raise SystemExit() and try to exit. We don't want that. try: tox.cmdline(argv[2:]) except SystemExit: pass # Print out the directory name for the shell script. print(temp_dir)
def run_tests(self): import tox import shlex if self.tox_args: errno = tox.cmdline(args=shlex.split(self.tox_args)) else: errno = tox.cmdline(self.test_args) sys.exit(errno)
def run_tests(self): #import here, cause outside the eggs aren't loaded import tox import shlex args = self.tox_args if args: args = shlex.split(self.tox_args) tox.cmdline(args=args)
def run_tests(self): # Import here, cause outside the eggs aren't loaded import tox # pylint: disable=import-error import shlex args = self.tox_args if args: args = shlex.split(self.tox_args) tox.cmdline(args=args)
def _run_tox(self): self.distribution.fetch_build_eggs(self.requirements_tox) import tox exit_code = tox.cmdline(args=self.additional_test_args) raise SystemExit(exit_code)
def run_tests(self): import tox if self.environment: self.test_args.append('-e{0}'.format(self.environment)) errno = tox.cmdline(self.test_args) sys.exit(errno)
def run_tests(self): # Import here because outside the eggs aren't loaded. import tox import shlex errno = tox.cmdline(args=shlex.split(self.tox_args)) sys.exit(errno)
def run_tests(self): #import here, cause outside the eggs aren't loaded import tox if self.environment: self.test_args.append('-e{0}'.format(self.environment)) errno = tox.cmdline(self.test_args) sys.exit(errno)
def run_tests(self): from tox import cmdline args = self.tox_args if args: args = split(self.tox_args) errno = cmdline(args=args) exit(errno)
def runtox(self, link): # publishing some infos to the commands started by tox #setenv_devpi(self.hub, env, posturl=self.current.resultlog, # packageurl=link.url, # packagemd5=link.md5) jsonreport = link.pkg.rootdir.join("toxreport.json") path_archive = link.pkg.path_archive toxargs = ["--installpkg", str(path_archive), "-i ALL=%s" % str(self.current.simpleindex), "--result-json", str(jsonreport), ] unpack_path = link.pkg.path_unpacked toxargs.extend(self.get_tox_args(unpack_path=unpack_path)) with link.pkg.path_unpacked.as_cwd(): self.hub.info("%s$ tox %s" %(os.getcwd(), " ".join(toxargs))) try: ret = tox.cmdline(toxargs) except SystemExit as e: ret = e.args[0] if ret != 2: jsondata = json.load(jsonreport.open("r")) url = URL(link.url) post_tox_json_report(self.hub, url.url_nofrag, jsondata) if ret != 0: self.hub.error("tox command failed", ret) return 1 return 0
def run_tests(self): #import here, cause outside the eggs aren't loaded import tox import os del os.environ["PYTHONPATH"] errcode = tox.cmdline(self.test_args) sys.exit(errcode)
def run_tests(self): import tox args = self.tox_args if args: args = split(self.tox_args) errno = tox.cmdline(args=args) exit(errno)
def run_tests(self): """Invoke the test runner (tox).""" # import here, cause outside the eggs aren't loaded import tox import shlex errno = tox.cmdline(args=shlex.split(self.tox_args)) sys.exit(errno)
def run_tests(self): import tox # import here, cause outside the eggs aren't loaded import shlex args = self.tox_args if args: args = shlex.split(self.tox_args) errno = tox.cmdline(args=args) sys.exit(errno)
def run_tests(self): import tox import shlex args = self.tox_args if args: args = shlex.split(self.tox_args) errno = tox.cmdline(args=args) sys.exit(errno)
def run_tests(self): # import here, cause outside the eggs aren't loaded import tox import shlex args_value = [] if self.tox_args: args_value = shlex.split(self.tox_args) errno = tox.cmdline(args=args_value) sys.exit(errno)
def run_tests(self): # Import here. Outside the .eggs/ will not load import tox import shlex args = self.tox_args if args: args = shlex.split(self.tox_args) errno = tox.cmdline(args=args) sys.exit(errno)
def run_tests(self): """Do the actual running of the tests.""" # import here, cause outside the eggs aren't loaded import tox import shlex args = self.tox_args if args: args = shlex.split(self.tox_args) errno = tox.cmdline(args=args) sys.exit(errno)
def run_tests(self): """run tox and pass on user-options""" # import here, cause outside the eggs aren't loaded import tox import shlex args = self.tox_args if args: args = shlex.split(self.tox_args) errno = tox.cmdline(args=args) sys.exit(errno)
def run_tests(self): import tox import shlex args = [] if self.tox_args: args = shlex.split(self.tox_args) sys.exit(tox.cmdline(args=args))
def run_tests(self): # Change to the dir containing tox bits chdir("..") #import here, cause outside the eggs aren't loaded import tox import shlex args = self.tox_args if args: args = shlex.split(self.tox_args) errno = tox.cmdline(args=args) sys.exit(errno)
def run_tests(self): # Import here since eggs aren't loaded outside of this scope import tox import shlex args = self.tox_args if args: args = shlex.split(self.tox_args) errno = tox.cmdline(args=args) sys.exit(errno)
def run_tests(self): # import here, because outside the eggs aren't loaded from tox import cmdline from shlex import split args = self.tox_args if args: args = split(self.tox_args) else: args = '' errno = cmdline(args=args) sys.exit(errno)
def main(): if sys.argv[1:2] == ['test']: import tox sys.exit(tox.cmdline(sys.argv[2:])) elif sys.argv[1:2] == ['bash']: from subprocess import call sys.exit(call('/usr/bin/bash', *sys.argv[2:])) else: os.environ.setdefault("DJANGO_SETTINGS_MODULE", "filmfest.settings.dev") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)
def run_tests(self): #import here, cause outside the eggs aren't loaded import tox import shlex args = self.tox_args # remove the 'test' arg from argv as tox passes it to ostestr which # breaks it. sys.argv.pop() if args: args = shlex.split(self.tox_args) errno = tox.cmdline(args=args) sys.exit(errno)
def run_tests(self): #import here, cause outside the eggs aren't loaded import tox import shlex args = self.tox_args if args: args = shlex.split(self.tox_args) elif os.environ.get("TOX_ARGUMENTS"): args = shlex.split(os.environ.get("TOX_ARGUMENTS")) else: args = shlex.split('-e py27') errno = tox.cmdline(args=args) sys.exit(errno)
def run_tests(self): # Import here, cause outside the eggs aren't loaded import tox import shlex # Get tox arguments from user options: args = self.tox_args if args: args = shlex.split(self.tox_args) # Launch tox and exit with return code: errno = tox.cmdline(args=args) sys.exit(errno)
def run(self): # Install test dependencies if needed. if self.distribution.tests_require: self.distribution.fetch_build_eggs(self.distribution.tests_require) # Add eggs to PYTHONPATH. We need to do this to ensure our eggs are # seen by Tox. self.distribution.export_live_eggs() import shlex import tox parsed_args = shlex.split(self.tox_args) result = tox.cmdline(args=parsed_args) sys.exit(result)
def run_tests(self): #import here, cause outside the eggs aren't loaded import tox tox.cmdline(self.test_args)
def run_tests(self): # import here, cause outside the eggs aren't loaded import tox exit(tox.cmdline([]))
def run_tests(self): # apparently necessary to import here import tox errcode = tox.cmdline(self.test_args) sys.exit(errcode)
def run_tests(self): from tox import cmdline # pylint: disable=import-error args = self.tox_args if args: args = split(self.tox_args) cmdline(args=args)
def run_tests(self): # import must be here, because outside the eggs aren't loaded import tox errcode = tox.cmdline(self.test_args) sys.exit(errcode)
def run_tests(self): import tox tox.cmdline()
def run(self): import tox sys.exit(tox.cmdline([]))
def test_tox_cmdline_no_args(monkeypatch): monkeypatch.setattr(sys, 'argv', ['caller_script', '--help']) with pytest.raises(SystemExit): tox.cmdline()
def run(self): self.install_dists(self.distribution) # noinspection PyUnresolvedReferences,PyPackageRequirements import tox tox.cmdline()
def test_tox_cmdline_args(initproj): initproj("help", filedefs={"tox.ini": ""}) with pytest.raises(SystemExit): tox.cmdline(["caller_script", "--help"])
def run_tests(self): import shlex import tox errno = tox.cmdline(args=shlex.split(self.tox_args)) sys.exit(errno)
def run_tests(self): """runs test suite""" import tox errcode = tox.cmdline(self.test_args) sys.exit(errcode)
def run_tests(self): import tox errno = tox.cmdline() sys.exit(errno)
def run_tests(self): import tox errcode = tox.cmdline(self.test_args) sys.exit(errcode)
def run_tests(self): # Import here, cause outside the eggs aren't loaded import tox # Raises SystemExit tox.cmdline(self.test_args)
def run_tests(self): # import here, otherwise eggs aren't loaded import tox errcode = tox.cmdline(self.test_args) sys.exit(errcode)
def run_tests(self): """Setting up to run the tests.""" # import here, this ensures eggs are loaded import tox errno = tox.cmdline(self.test_args) sys.exit(errno)
def run_tests(self): #import here, cause outside the eggs aren't loaded import tox import virtualenv errcode = tox.cmdline(self.test_args) sys.exit(errcode)
def run_tests(self): import tox # import here, cause outside the eggs aren't loaded. errno = tox.cmdline(self.test_args) sys.exit(errno)
def run_tests(self): import tox errno = tox.cmdline(self.test_args) exit(errno)
def run_tests(self): import tox sys.exit(tox.cmdline(self.test_args))
def run_tests(self): #import here, cause outside the eggs aren't loaded import tox errno = tox.cmdline(args=self.tox_args.split()) sys.exit(errno)
def run_tests(self): import tox tox.cmdline(self.test_args)
def test_tox_cmdline_no_args(monkeypatch): monkeypatch.setattr(sys, "argv", ["caller_script", "--help"]) with pytest.raises(SystemExit): tox.cmdline()
def run_tests(self): # import tox here, because outside the eggs aren't loaded yet import tox errno = tox.cmdline(self.test_args) sys.exit(errno)
def test_tox_cmdline_args(): with pytest.raises(SystemExit): tox.cmdline(["caller_script", "--help"])
def run_tests(self): import tox # Import here, because outside eggs aren't loaded. import shlex sys.exit(tox.cmdline(args=shlex.split(self.tox_args)))
def test_tox_cmdline_args(): with pytest.raises(SystemExit): tox.cmdline(['caller_script', '--help'])
def test_tox_cmdline_no_args(monkeypatch, initproj): initproj("help", filedefs={"tox.ini": ""}) monkeypatch.setattr(sys, "argv", ["caller_script", "--help"]) with pytest.raises(SystemExit): tox.cmdline()
def run(cls): import tox sys.exit(tox.cmdline([]))