def run(self): build_cmd = self.get_finalized_command('build') build_cmd.run() sys.path.insert(0, build_cmd.build_lib) if sys.version_info[0] < 3: sys.path.insert(0, 'tests/lib') else: sys.path.insert(0, 'tests/lib3') import test_all test_all.main([])
def run(self): import sys import unittest sys.path.append(join(dirname(__file__), 'tests')) import test_all sys.exit(test_all.main())
def run(self): build_cmd = self.get_finalized_command('build') build_cmd.run() # running the tests this way can pollute the post-MANIFEST build sources # (see https://github.com/yaml/pyyaml/issues/527#issuecomment-921058344) # until we remove the test command, run tests from an ephemeral copy of the intermediate build sources tempdir = tempfile.TemporaryDirectory(prefix='test_pyyaml') try: # have to create a subdir since we don't get dir_exists_ok on copytree until 3.8 temp_test_path = pathlib.Path(tempdir.name) / 'pyyaml' shutil.copytree(build_cmd.build_lib, temp_test_path) sys.path.insert(0, str(temp_test_path)) sys.path.insert(0, 'tests/lib') import test_all if not test_all.main([]): raise DistutilsError("Tests failed") finally: try: # this can fail under Windows; best-effort cleanup tempdir.cleanup() except Exception: pass
def run(self): build_cmd = self.get_finalized_command('build') build_cmd.run() sys.path.insert(0, build_cmd.build_lib) sys.path.insert(0, 'tests/lib') import test_all if not test_all.main([]): raise DistutilsError("Tests failed")
def run(self): build_cmd = self.get_finalized_command('build') build_cmd.run() sys.path.insert(0, build_cmd.build_lib) if sys.version_info[0] < 3: sys.path.insert(0, 'tests/lib') else: sys.path.insert(0, 'tests/lib3') import test_all if not test_all.main([]): raise DistutilsError("Tests failed")
def run(self): build_cmd = self.get_finalized_command("build") build_cmd.run() sys.path.insert(0, build_cmd.build_lib) if sys.version_info[0] < 3: sys.path.insert(0, "tests/lib") else: sys.path.insert(0, "tests/lib3") import test_all if not test_all.main([]): raise DistutilsError("Tests failed")
import test_all test_all.main()
def run(self): # run the unit test to make sure that there is no regression import test_all test_all.main()
import os import sys os.chdir('pyyaml') if sys.version_info[0] < 3: sys.path.insert(0, 'tests/lib') else: sys.path.insert(0, 'tests/lib3') import test_all test_all.main([])