Completed
Push — status ( 924687...ef6f36 )
by Michael
17:16 queued 07:15
created

test_unreleased_version()   A

Complexity

Conditions 3

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 3
c 0
b 0
f 0
dl 0
loc 6
rs 9.4285
1
import os
2
3
from semantic_version import Version
0 ignored issues
show
Configuration introduced by
The import semantic_version 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...
4
5
from changes import models
6
7
8
def test_repository_parses_remote_url(git_repo):
0 ignored issues
show
Coding Style Naming introduced by
The name test_repository_parses_remote_url does not conform to the function naming conventions ([a-z_][a-z0-9_]{2,30}$).

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...
9
    repository = models.GitRepository()
10
    assert 'test_app' == repository.repo
11
    assert 'michaeljoseph' == repository.owner
12
13
14
def test_repository_parses_versions(git_repo_with_merge_commit):
15
    repository = models.GitRepository()
16
17
    v1 = Version('0.0.1')
0 ignored issues
show
Coding Style Naming introduced by
The name v1 does not conform to the variable naming conventions ([a-z_][a-z0-9_]{2,30}$).

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...
18
    assert [v1] == repository.versions
19
20
    assert v1 == repository.latest_version
21
22
23
def test_unreleased_version(git_repo):
24
    repository = models.GitRepository()
25
26
    assert 0 == len(repository.versions)
27
28
    assert Version('0.0.0') == repository.latest_version
29