def disable_test_all_conan_versions_build(self) -> None: set_home_directory() releases = PrepareConanRelease.get_accepted_approval_releases( ProjectDetails()) conan_details = ConanReleaseDetails(ProjectDetails()) for release in releases: DeployConanRelease.test_conan_build_passes(conan_details, release)
def get_deploy_release(self) -> DeployRelease: set_home_directory() old_version = Version(0, 0, 1) new_version = Version(0, 1, 0) deploy = False release_details = ReleaseDetails(old_version, new_version, deploy, ProjectDetails()) return DeployRelease(release_details)
def test_conandata_yml(self) -> None: text = '' for i in range(3): text += PrepareConanRelease.create_conandata_yml_text( ProjectDetails(), Version(1, 1, i), "single_header_sha", "licence_sha") verify(text)
def get_prepare_release(self) -> CppGeneration: set_home_directory() old_version = Version(8, 4, 0) new_version = Version(8, 5, 0) deploy = False release_details = ReleaseDetails(old_version, new_version, deploy, ProjectDetails()) return CppGeneration(release_details)
def qt_project_details() -> ProjectDetails: details = ProjectDetails( github_project_name='ApprovalTests.cpp.Qt', library_folder_name='ApprovalTestsQt', simulated_single_header_file='ApprovalTestsQt.hpp', version_header='ApprovalTestsQtVersion.h', macro_prefix='APPROVAL_TESTS_QT', conan_directory_name='approvaltests.cpp.qt', update_documentation=True, update_conan=False) return details
def test_get_new_branch_name(self) -> None: self.assertEqual( 'approval-tests-cpp.1.2.3', PrepareVcpkgRelease.get_new_branch_name(ProjectDetails(), Version(1, 2, 3)))
def test_vcpkg_version_number(self) -> None: releases = PrepareVcpkgRelease.get_accepted_approval_releases( ProjectDetails()) #print(f'Release: {releases}') self.assertIn('10.9.1', releases)
def test_vcpkg_approvaltests_dir(self) -> None: set_home_directory() vcpkg_release_details = VcpkgReleaseDetails(ProjectDetails()) self.assertTrue( vcpkg_release_details.vcpkg_approvaltests_dir.endswith( 'approval-tests-cpp'))
#! /usr/bin/env python3 from scripts.prepare_release import build from scripts.project_details import ProjectDetails if __name__ == '__main__': build(lambda v: v.update_major(), deploy=True, project_details=ProjectDetails())
def test_check_url_exists(self) -> None: self.assertFalse( check_url_exists( DeployRelease. get_url_for_starter_project_single_header_for_version( ProjectDetails(), '1.1.1')))
#! /usr/bin/env python3 import os from scripts.project_details import ProjectDetails from scripts.single_header_file import SingleHeaderFile if __name__ == '__main__': os.chdir("../ApprovalTests") SingleHeaderFile.create('.', ProjectDetails(), include_cpps=False)
def test(self) -> None: details = ReleaseDetails(Version(1, 2, 3), Version(1, 2, 4), True, ProjectDetails()) verify_as_json(details)
def test_conan_version_number(self) -> None: self.assertIn( '8.9.2', PrepareConanRelease.get_accepted_approval_releases( ProjectDetails()))
def test_conan_approvaltests_dir(self) -> None: conan_release_details = ConanReleaseDetails(ProjectDetails()) self.assertTrue( conan_release_details.conan_approvaltests_dir.endswith( 'approvaltests.cpp'))
def test(self) -> None: details = ReleaseDetails(Version(1, 2, 3), Version(1, 2, 4), True, ProjectDetails()) scrubber = Options().with_scrubber( lambda t: t.replace('"../../conan-', '"../../../conan/conan-')) verify_as_json(details, options=scrubber)
#! /usr/bin/env python3 from scripts.prepare_release import build from scripts.project_details import ProjectDetails if __name__ == '__main__': build(lambda v: v.update_minor(), deploy = True, project_details=ProjectDetails())
def disabled_test_entry_point_for_uncommitted_changes(self) -> None: set_home_directory() repo = Repo(ConanReleaseDetails(ProjectDetails()).conan_repo_dir) GitUtilities.check_no_uncommitted_changes(repo)
def test(self) -> None: details = ProjectDetails() verify_as_json(details)
def test_update_version_number_header(self) -> None: new_version = Version(8, 5, 0) output = CppGeneration.get_version_number_hpp_text( new_version, ProjectDetails()) verify(output)