Skip to content

Commit

Permalink
Use isinstance() for type comparisons.
Browse files Browse the repository at this point in the history
  • Loading branch information
cbrueffer authored and peterjc committed Dec 4, 2012
1 parent 3bfb4bb commit 332494c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions Tests/test_PopGen_FDist_nodepend.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ def test_record_basic(self):
"""

r = FDist.Record()
assert type(r.data_org) == int
assert type(r.num_pops) == int
assert type(r.num_loci) == int
assert type(r.loci_data) == list
assert isinstance(r.data_org, int)
assert isinstance(r.num_pops, int)
assert isinstance(r.num_loci, int)
assert isinstance(r.loci_data, list)

class ParserTest(unittest.TestCase):
def setUp(self):
Expand Down
8 changes: 4 additions & 4 deletions Tests/test_PopGen_GenePop_nodepend.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ def test_record_basic(self):
"""

r = GenePop.Record()
assert type(r.marker_len) == int
assert type(r.comment_line) == str
assert type(r.loci_list) == list
assert type(r.populations) == list
assert isinstance(r.marker_len, int)
assert isinstance(r.comment_line, str)
assert isinstance(r.loci_list, list)
assert isinstance(r.populations, list)


class ParserTest(unittest.TestCase):
Expand Down

0 comments on commit 332494c

Please sign in to comment.