@@ 89-104 (lines=16) @@ | ||
86 | assert result.exit_code == 0 |
|
87 | ||
88 | def test_all(git_repo): |
|
89 | runner = CliRunner() |
|
90 | ||
91 | arg = ['-f', 'all', git_repo.working_tree_dir] |
|
92 | output_path = os.path.join(git_repo.working_tree_dir, 'version') |
|
93 | ||
94 | result = runner.invoke(git_app_version_main, arg) |
|
95 | ||
96 | assert result.output.find('Git commit :') != -1 |
|
97 | assert re.search(r"version\s+0.1.2", result.output) |
|
98 | assert result.output.find('written to :') != -1 |
|
99 | assert result.output.find(output_path+'.json') != -1 |
|
100 | assert result.output.find(output_path+'.yml') != -1 |
|
101 | assert result.output.find(output_path+'.xml') != -1 |
|
102 | assert result.output.find(output_path+'.sh') != -1 |
|
103 | assert result.output.find(output_path+'.ini') != -1 |
|
104 | assert result.output.find(output_path+'.csv') != -1 |
|
105 | ||
106 | assert os.path.exists(output_path+'.json') |
|
107 | assert os.path.exists(output_path+'.yml') |
|
@@ 73-87 (lines=15) @@ | ||
70 | ||
71 | ||
72 | def test_json(git_repo): |
|
73 | runner = CliRunner() |
|
74 | ||
75 | arg = [git_repo.working_tree_dir] |
|
76 | output_path = os.path.join(git_repo.working_tree_dir, 'version.json') |
|
77 | ||
78 | result = runner.invoke(git_app_version_main, arg) |
|
79 | ||
80 | assert result.output.find('Git commit :') != -1 |
|
81 | assert re.search(r"version\s+0.1.2", result.output) |
|
82 | assert result.output.find('written to :') != -1 |
|
83 | assert result.output.find(output_path) != -1 |
|
84 | ||
85 | assert os.path.exists(output_path) |
|
86 | assert result.exit_code == 0 |
|
87 | ||
88 | def test_all(git_repo): |
|
89 | runner = CliRunner() |
|
90 |