Completed
Push — master ( 0afc85...3f943d )
by
unknown
01:32
created

test_read_document_folder_junk()   A

Complexity

Conditions 1

Size

Total Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 5
rs 9.4285
cc 1
1
import nose.tools as nt
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...
Configuration introduced by
The import nose.tools could not be resolved.

This can be caused by one of the following:

1. Missing Dependencies

This error could indicate a configuration issue of Pylint. Make sure that your libraries are available by adding the necessary commands.

# .scrutinizer.yml
before_commands:
    - sudo pip install abc # Python2
    - sudo pip3 install abc # Python3
Tip: We are currently not using virtualenv to run pylint, when installing your modules make sure to use the command for the correct version.

2. Missing __init__.py files

This error could also result from missing __init__.py files in your module folders. Make sure that you place one file in each sub-folder.

Loading history...
2
3
from topik.fileio import read_document_folder
4
from topik.fileio.tests import test_data_path
5
from ._solutions import solution_document_folder, solution_document_folder_gz
6
7
8
def test_read_document_folder():
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...
9
    documents = read_document_folder(
10
        '{}/test_data_folder_files'.format(test_data_path),
0 ignored issues
show
Comprehensibility Best Practice introduced by
The variable test_data_path does not seem to be defined.
Loading history...
11
        content_field="abstract")
12
    nt.assert_true(solution_document_folder == next(iter(documents))['abstract'])
0 ignored issues
show
Comprehensibility Best Practice introduced by
The variable solution_document_folder does not seem to be defined.
Loading history...
13
14
15
def test_read_document_folder_junk():
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...
16
    documents = read_document_folder(
17
        '{}/test_data_folder_files_junk'.format(test_data_path),
0 ignored issues
show
Comprehensibility Best Practice introduced by
The variable test_data_path does not seem to be defined.
Loading history...
18
        content_field="abstract")
19
    nt.assert_true(solution_document_folder == next(iter(documents))['abstract'])
0 ignored issues
show
Comprehensibility Best Practice introduced by
The variable solution_document_folder does not seem to be defined.
Loading history...
20
21
22
def test_read_document_folder_gz():
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...
23
    documents = read_document_folder(
24
        '{}/test_data_folder_files_gz'.format(test_data_path),
0 ignored issues
show
Comprehensibility Best Practice introduced by
The variable test_data_path does not seem to be defined.
Loading history...
25
        content_field="abstract")
26
    nt.assert_true(solution_document_folder_gz == next(iter(documents))['abstract'])
0 ignored issues
show
Comprehensibility Best Practice introduced by
The variable solution_document_folder_gz does not seem to be defined.
Loading history...
27
28
29
def test_bad_folder():
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...
30
    nt.assert_raises(IOError, next, read_document_folder("Frank",
0 ignored issues
show
Comprehensibility Best Practice introduced by
The variable IOError does not seem to be defined.
Loading history...
Comprehensibility Best Practice introduced by
The variable next does not seem to be defined.
Loading history...
31
                                                         content_field='theTank'))
0 ignored issues
show
Coding Style introduced by
Final newline missing
Loading history...