def main(): parser = create_parser() args = parser.parse_args() conflicts = get_conflicts(args.apps_dir) if conflicts: print(conflicts) sys.exit(1) else: print('No conflicts detected.')
def test_squashed_basic_conflict(self): test_dir = os.path.join(TEST_DATA_PATH, '05_squashed_basic_conflict') result = [('llamas', ['0001_squashed_0002_auto_20190509_1610', '0002_new_one'])] assert result == get_conflicts(test_dir)
def test_squashed_no_conflict(self): test_dir = os.path.join(TEST_DATA_PATH, '04_squashed_no_conflict') assert [] == get_conflicts(test_dir)
def test_no_app_dir(self): test_dir = os.path.join(TEST_DATA_PATH, '02_basic_conflicts') os.chdir(test_dir) assert ([('alpacas', ['0001_initial', '0002_new'])] == get_conflicts())
def test_inter_app_conflict(self): test_dir = os.path.join(TEST_DATA_PATH, '03_inter_app_conflict') assert ([('llamas', ['0001_initial', '0002_new_one'])] == get_conflicts(test_dir))
def test_no_conflicts(self): test_dir = os.path.join(TEST_DATA_PATH, '01_no_conflicts') assert [] == get_conflicts(test_dir)
def test_no_apps(self): assert [] == get_conflicts(TEST_DATA_PATH)