Passed
Push — packagify ( 8cc350...6750af )
by Konstantinos
01:32
created

tests.train-script-test.test_launching()   A

Complexity

Conditions 1

Size

Total Lines 11
Code Lines 11

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 11
nop 1
dl 0
loc 11
rs 9.85
c 0
b 0
f 0
1
import os
0 ignored issues
show
Coding Style Naming introduced by
The name train-script-test does not conform to the module naming conventions ((([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Coding Style introduced by
This module should have a docstring.

The coding style of this project requires that you add a docstring to this code element. Below, you find an example for methods:

class SomeClass:
    def some_method(self):
        """Do x and return foo."""

If you would like to know more about docstrings, we recommend to read PEP-257: Docstring Conventions.

Loading history...
2
import pytest
0 ignored issues
show
introduced by
Unable to import 'pytest'
Loading history...
Unused Code introduced by
The import pytest seems to be unused.
Loading history...
3
4
# @pytest.fixture(scope='module')
5
# def senario():
6
7
import subprocess
0 ignored issues
show
introduced by
standard import "import subprocess" should be placed before "import pytest"
Loading history...
8
9
# from click.testing import CliRunner
10
11
from music_album_creation.create_album import main
0 ignored issues
show
introduced by
Unable to import 'music_album_creation.create_album'
Loading history...
Unused Code introduced by
Unused main imported from music_album_creation.create_album
Loading history...
12
this_dir = os.path.dirname(os.path.realpath(__file__))
0 ignored issues
show
Coding Style Naming introduced by
The name this_dir does not conform to the constant naming conventions ((([A-Z_][A-Z0-9_]*)|(__.*__))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
13
14
def test_launching(tmpdir):
0 ignored issues
show
Coding Style introduced by
This function should have a docstring.

The coding style of this project requires that you add a docstring to this code element. Below, you find an example for methods:

class SomeClass:
    def some_method(self):
        """Do x and return foo."""

If you would like to know more about docstrings, we recommend to read PEP-257: Docstring Conventions.

Loading history...
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)
0 ignored issues
show
Coding Style introduced by
This line is too long as per the coding-style (166/100).

This check looks for lines that are too long. You can specify the maximum line length.

Loading history...
Coding Style Naming introduced by
The name ro does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module subprocess does not seem to have a member named run.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
18
    assert ro.returncode == 0
19
    ro = subprocess.run(['train', '--help'], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
0 ignored issues
show
Coding Style Naming introduced by
The name ro does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module subprocess does not seem to have a member named run.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
20
    assert ro.returncode == 0
21
    ro = subprocess.run(['tune', '--help'], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
0 ignored issues
show
Coding Style Naming introduced by
The name ro does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module subprocess does not seem to have a member named run.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
22
    assert ro.returncode == 0
23
    ro = subprocess.run(['make-graphs', '--help'], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
0 ignored issues
show
Coding Style Naming introduced by
The name ro does not conform to the variable naming conventions ((([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Bug introduced by
The Module subprocess does not seem to have a member named run.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
24
    assert ro.returncode == 0
25
26
#     def test_main():
27
#         runner = CliRunner()
28
#         result = runner.invoke(main, ['--help'])
29
#         assert result.exit_code == 0
30