def prepare(): with open(".test-config", "w+"): pass git = GitManager({"config": ".test-config"}) loc = "test_current_locally" glb = "test_current_globally" git.add_profile(Profile(loc, loc, loc, loc)) git.add_profile(Profile(glb, glb, glb, glb)) yield git, loc, glb os.remove(".test-config")
def prepare(): git = GitManager({}) profiles_to_add = [] # Generate 10 profiles for i in range(10): test = "test-local-{0}".format(i) profile = Profile(test, test, None, test) profiles_to_add.append(profile) for p in profiles_to_add: git.add_profile(p) yield git
def __init__(self, args: any) -> None: self.args = args self.quiet = args.quiet self.globally = args.globally self.git_manager = GitManager({ "config": args.file, "quiet": args.quiet, "globally": args.globally })
def prepare(): with open(".test-config", "w+"): pass profiles_to_add = [] git = GitManager({ "config": ".test-config" }) for i in range(10): test = "test-local-{0}".format(i) profile = Profile(test, test, None, test) profiles_to_add.append(profile) for p in profiles_to_add: git.add_profile(p) yield git os.remove(".test-config")
def prepare(): with open(".test-config", "w+"): pass git = GitManager({"config": ".test-config"}) loc = "test_current_locally" glb = "test_current_globally" # Generate two profiles to test for active locally/globally profiles_to_add = [Profile(loc, loc, loc, loc), Profile(glb, glb, glb, glb)] # Generate 10 profiles for i in range(10): test = "test-local-{0}".format(i) profile = Profile(test, test, None, test) profiles_to_add.append(profile) for p in profiles_to_add: git.add_profile(p) yield git, loc, glb os.remove(".test-config")
def prepare(): git = GitManager({}) test = "test-update-profile" profile = Profile(test, test, None, test) git.add_profile(profile) yield git git.del_profile("profile.{0}".format(profile.profile_name))
def prepare(): git = GitManager({}) profiles_to_add = [] # Generate 10 profiles for i in range(10): test = "test-local-{0}".format(i) profile = Profile(test, test, test, test) profiles_to_add.append(profile) for p in profiles_to_add: git.add_profile(p) yield git # Delete the added profiles for p in profiles_to_add: git.del_profile("profile.{0}".format(p.profile_name))
def prepare(): git = GitManager({}) yield git