Skip to content

Commit

Permalink
Changed xrange to range for #8 (#30)
Browse files Browse the repository at this point in the history
  • Loading branch information
earthgecko authored and MaxBenChrist committed Nov 2, 2016
1 parent 3b2c204 commit 47c1ff0
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions tests/test_feature_significance.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,15 @@ def test_binary_target_mixed_case(self):
self.assertGreater(len(feat_rej), 0)

# Test type outputs
for i in xrange(1, 6):
for i in range(1, 6):
row = df_bh.loc["rel{}".format(i)]
self.assertEqual(row.Feature, "rel{}".format(i))
if i == 1:
self.assertEqual(row.type, "binary")
else:
self.assertEqual(row.type, "real")

for i in xrange(1, 10):
for i in range(1, 10):
row = df_bh.loc["irr{}".format(i)]
self.assertEqual(row.Feature, "irr{}".format(i))
if i not in [3, 6, 9]:
Expand Down Expand Up @@ -123,12 +123,12 @@ def test_binary_target_binary_features(self):
self.assertGreater(len(feat_rej), 0)

# Test type outputs
for i in xrange(1, 6):
for i in range(1, 6):
row = df_bh.loc["rel{}".format(i)]
self.assertEqual(row.Feature, "rel{}".format(i))
self.assertEqual(row.type, "binary")

for i in xrange(1, 20):
for i in range(1, 20):
row = df_bh.loc["irr{}".format(i)]
self.assertEqual(row.Feature, "irr{}".format(i))
self.assertEqual(row.type, "binary")
Expand Down Expand Up @@ -164,12 +164,12 @@ def test_binomial_target_realvalued_features(self):
self.assertGreater(len(feat_rej), 0)

# Test type outputs
for i in xrange(1, 5):
for i in range(1, 5):
row = df_bh.loc["rel{}".format(i)]
self.assertEqual(row.Feature, "rel{}".format(i))
self.assertEqual(row.type, "real")

for i in xrange(1, 30):
for i in range(1, 30):
row = df_bh.loc["irr{}".format(i)]
self.assertEqual(row.Feature, "irr{}".format(i))
self.assertEqual(row.type, "real")
Expand Down Expand Up @@ -210,15 +210,15 @@ def test_real_target_mixed_case(self):
self.assertGreater(len(feat_rej), 0)

# Test type outputs
for i in xrange(1, 5):
for i in range(1, 5):
row = df_bh.loc["rel{}".format(i)]
self.assertEqual(row.Feature, "rel{}".format(i))
if i == 1:
self.assertEqual(row.type, "binary")
else:
self.assertEqual(row.type, "real")

for i in xrange(1, 10):
for i in range(1, 10):
row = df_bh.loc["irr{}".format(i)]
self.assertEqual(row.Feature, "irr{}".format(i))
if i in [3, 6, 9]:
Expand Down

0 comments on commit 47c1ff0

Please sign in to comment.