| Total Complexity | 1 |
| Total Lines | 25 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | import os |
||
|
|
|||
| 2 | import pytest |
||
| 3 | |||
| 4 | # @pytest.fixture(scope='module') |
||
| 5 | # def senario(): |
||
| 6 | |||
| 7 | import subprocess |
||
| 8 | |||
| 9 | # from click.testing import CliRunner |
||
| 10 | |||
| 11 | from music_album_creation.create_album import main |
||
| 12 | this_dir = os.path.dirname(os.path.realpath(__file__)) |
||
| 13 | |||
| 14 | def test_launching(tmpdir): |
||
| 15 | target_directory = str(tmpdir.mkdir('unittest-datasets-dir')) |
||
| 16 | os.environ["COLLECTIONS_DIR"] = target_directory |
||
| 17 | ro = subprocess.run(['transform', 'posts', os.path.join(this_dir, 'test-pipeline.cfg'), '--sample 100', '--help'], stdout=subprocess.PIPE, stderr=subprocess.PIPE) |
||
| 18 | assert ro.returncode == 0 |
||
| 19 | ro = subprocess.run(['train', '--help'], stdout=subprocess.PIPE, stderr=subprocess.PIPE) |
||
| 20 | assert ro.returncode == 0 |
||
| 21 | ro = subprocess.run(['tune', '--help'], stdout=subprocess.PIPE, stderr=subprocess.PIPE) |
||
| 22 | assert ro.returncode == 0 |
||
| 23 | ro = subprocess.run(['make-graphs', '--help'], stdout=subprocess.PIPE, stderr=subprocess.PIPE) |
||
| 24 | assert ro.returncode == 0 |
||
| 25 | |||
| 30 |
The coding style of this project requires that you add a docstring to this code element. Below, you find an example for methods:
If you would like to know more about docstrings, we recommend to read PEP-257: Docstring Conventions.