Passed
Branch dev-release (a75e90)
by Konstantinos
02:13
created

tests.scripts_test   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 24
dl 0
loc 32
rs 10
c 0
b 0
f 0
wmc 1

1 Function

Rating   Name   Duplication   Size   Complexity  
A test_launching() 0 19 1
1
import os
0 ignored issues
show
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
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...
12
13
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...
14
    target_directory = str(tmpdir.mkdir('unittest-datasets-dir'))
15
    os.environ["COLLECTIONS_DIR"] = target_directory
16
    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...
17
    assert ro.returncode == 0
18
    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...
19
    assert ro.returncode == 0
20
    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...
21
    assert ro.returncode == 0
22
    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...
23
    assert ro.returncode == 0
24
    ro = subprocess.run(['report-datasets', '--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 (102/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...
25
    assert ro.returncode == 0
26
    ro = subprocess.run(['report-models', '--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...
27
    assert ro.returncode == 0
28
    ro = subprocess.run(['report-topics', '--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...
29
    assert ro.returncode == 0
30
    ro = subprocess.run(['report-kl', '--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...
31
    assert ro.returncode == 0
32
33
#     def test_main():
34
#         runner = CliRunner()
35
#         result = runner.invoke(main, ['--help'])
36
#         assert result.exit_code == 0
37