Completed
Push — init ( 57bb17 )
by Michael
06:45
created

test_merged_pull_requests()   A

Complexity

Conditions 3

Size

Total Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 3
c 1
b 0
f 0
dl 0
loc 8
rs 9.4285
1
from changes import models
2
from plumbum.cmd import git
0 ignored issues
show
Configuration introduced by
The import plumbum.cmd 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...
3
4
5
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...
6
    repository = models.GitRepository()
7
    assert 'test_app' == repository.repo
8
    assert 'michaeljoseph' == repository.owner
9
10
11
def test_merged_pull_requests(git_repo):
12
    github = 'Merge pull request #111 from michaeljoseph/appveyor'
13
    git('commit', '--allow-empty', '-m', github)
14
15
    pull_requests = models.merged_pull_requests()
16
    assert 1 == len(pull_requests)
17
18
    assert pull_requests[0].pr_number == '111'
19