Skip to content

Commit

Permalink
unit testing finished
Browse files Browse the repository at this point in the history
  • Loading branch information
boat-builder committed Aug 10, 2016
1 parent 39a082d commit be0ee79
Showing 1 changed file with 4 additions and 13 deletions.
17 changes: 4 additions & 13 deletions corenlp_pywrap/test_using_pytest.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ def test_localurl(self):
assert '127.0.0.1' in self.cn.url\
or 'localhost' in self.cn.url,\
'script is pointing to cloud'
assert not self.url.endswith('/'), 'cannot ends with /'
def test_no_sentiments(self):
assert 'SENTIMENT' not in map(
str.upper, self.cn.annotator_full_list),\
'Sentiment is not supported'

class Test_basic():
pass

def annot_len(self):
assert len(self.annotator_list) == 14

class Test_serverconnection():
sc_obj = p.CoreNLP()
cur_url = sc_obj.url_calc()
Expand All @@ -27,12 +27,3 @@ class Test_serverconnection():
def test_return_type(self):
assert isinstance(self.r, dict), 'arrange function should return a'\
'requests object which is convertable to dictionary'

def test_r(self):
assert 'sentences' in self.r, 'value should be there'
assert 'corefs' in self.r, 'value should be there.'
assert len(self.r) == 2, 'should not have more than one value'

def test_sentences(self):
self.rs = self.r['sentences']
assert len(self.rs) == 1, 'only one list'

0 comments on commit be0ee79

Please sign in to comment.