Skip to content

Commit

Permalink
- advanced test coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
ttinies committed Jul 11, 2018
1 parent 502c00f commit 8173edf
Showing 1 changed file with 26 additions and 1 deletion.
27 changes: 26 additions & 1 deletion tests/test_containers.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,32 @@ def test_RestrictedType():


def test_pySC2protocolObj():
assert True
class dummyObj(object):
def __iter__(self):
#print(dir(self))
attrs = [a for a in dir(self) if '__' not in a]
print(attrs)
return iter(dir(self))
def HasField(self, attrName):
return attrName in dir(self)

obj = dummyObj()
#obj.
#attrs = {}
a = cn.pySC2protocolObj(["a", "b", "c"], sc2protData=obj)
assert a
assert iter(a)
assert 'a' in a
assert 'd' not in a
b = cn.pySC2protocolObj(a)
assert a == b
b.c = 1
assert a != b
assert a.allowAutocast == False
assert a.allowMinimap == False


test_pySC2protocolObj()


def test_MultiType():
Expand Down

0 comments on commit 8173edf

Please sign in to comment.