Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
howderek committed Jun 5, 2018
1 parent 7a55279 commit 399c792
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions test/test_ghtorrent.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def test_userid(ghtorrent):
"""
Pandas testing format
assert ghtorrent.<function>(ghtorrent.repoid('owner', 'repo')).isin(['<data that should be in dataframe>']).any
assert ghtorrent.<function>('owner', 'repo').isin(['<data that should be in dataframe>']).any
The tests check if a value is anywhere in the dataframe
Expand All @@ -27,23 +27,23 @@ def test_userid(ghtorrent):

# *** GROWTH, MATURITY, AND DECLINE *** #
def test_issues(ghtorrent):
assert ghtorrent.issues(ghtorrent.repoid('mongodb', 'mongo')).isin(["2013-01-05"]).any
assert ghtorrent.issues('mongodb', 'mongo').isin(["2013-01-05"]).any

# issues closed

def test_issue_response_time(ghtorrent):
assert ghtorrent.issue_response_time(ghtorrent.repoid('hadley', 'devtools')).isin([1]).any
assert ghtorrent.issue_response_time('hadley', 'devtools').isin([1]).any

def test_issues_with_close(ghtorrent):
assert ghtorrent.issues_with_close(ghtorrent.repoid('TrinityCore', 'TrinityCore')).isin(["2012-01-08"]).any
assert ghtorrent.issues_with_close('TrinityCore', 'TrinityCore').isin(["2012-01-08"]).any

def test_commits(ghtorrent):
assert ghtorrent.commits(ghtorrent.repoid('facebook', 'folly')).isin(["2013-01-07"]).any
assert ghtorrent.commits('facebook', 'folly').isin(["2013-01-07"]).any

# time to first maintainer response

def test_forks(ghtorrent):
assert ghtorrent.forks(ghtorrent.repoid('facebook', 'hiphop-php')).isin(["2012-01-08"]).any
assert ghtorrent.forks('facebook', 'hiphop-php').isin(["2012-01-08"]).any

# pulls

Expand All @@ -65,16 +65,16 @@ def test_forks(ghtorrent):
# commit_comments

def test_committer_locations(ghtorrent):
assert ghtorrent.committer_locations(ghtorrent.repoid('mavam', 'stat-cookbook')).isin(["Berkeley, CA"]).any
assert ghtorrent.committer_locations('mavam', 'stat-cookbook').isin(["Berkeley, CA"]).any

def test_issue_activity(ghtorrent):
assert ghtorrent.issue_activity(ghtorrent.repoid('bitcoin', 'bitcoin')).isin(["2010-12-20T00:00:00.000Z"]).any
assert ghtorrent.issue_activity('bitcoin', 'bitcoin').isin(["2010-12-20T00:00:00.000Z"]).any

def test_pull_acceptance_rate(ghtorrent):
assert ghtorrent.pull_acceptance_rate(ghtorrent.repoid('akka', 'akka')).isin([0.5]).any# commits100
assert ghtorrent.pull_acceptance_rate('akka', 'akka').isin([0.5]).any# commits100

def test_contributions(ghtorrent):
assert ghtorrent.contributions(ghtorrent.repoid('ariya', 'phantomjs')).isin(["ariya"]).any
assert ghtorrent.contributions('ariya', 'phantomjs').isin(["ariya"]).any

# community age

Expand All @@ -83,7 +83,7 @@ def test_contributions(ghtorrent):
# fakes

def test_contributors(ghtorrent):
assert ghtorrent.contributors(ghtorrent.repoid('TTimo', 'doom3.gpl')).isin(["sergiocampama"]).any
assert ghtorrent.contributors('TTimo', 'doom3.gpl').isin(["sergiocampama"]).any



Expand Down

0 comments on commit 399c792

Please sign in to comment.