Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

TST quiet python 3 unit test warnings

  • Loading branch information...
commit 6d8d6fcfad665a81f7891b7a5f9a52cbf33baded 1 parent 58e54d0
@kwgoodman authored
Showing with 9 additions and 9 deletions.
  1. +8 −8 la/tests/io_test.py
  2. +1 −1  la/util/tests/misc_test.py
View
16 la/tests/io_test.py
@@ -31,12 +31,12 @@ def test_io_1(self):
io = IO(self.filename)
x = larry([1,2,3])
io['x'] = x
- self.assert_('x' in io, 'key missing')
- self.assert_((x == io['x'][:]).all(), 'save and load difference')
- self.assert_(['x'] == io.keys(), 'keys are different')
- self.assert_(x.dtype == io['x'].dtype, 'dtype changed')
+ self.assertTrue('x' in io, 'key missing')
+ self.assertTrue((x == io['x'][:]).all(), 'save and load difference')
+ self.assertTrue(['x'] == io.keys(), 'keys are different')
+ self.assertTrue(x.dtype == io['x'].dtype, 'dtype changed')
del io['x']
- self.assert_(io.keys() == [], 'key still present')
+ self.assertTrue(io.keys() == [], 'key still present')
def test_io_2(self):
"io_repack"
@@ -48,8 +48,8 @@ def test_io_2(self):
io.repack()
fs2 = io.freespace
sp2 = io.space
- self.assert_(fs2 < fs1, 'repack did not reduce freespace')
- self.assert_(sp2 < sp1, 'repack did not reduce space')
+ self.assertTrue(fs2 < fs1, 'repack did not reduce freespace')
+ self.assertTrue(sp2 < sp1, 'repack did not reduce space')
def test_io_3(self):
"io_keys"
@@ -61,7 +61,7 @@ def test_io_3(self):
keys = io.keys()
keys.sort()
theory = ['1', '1/2/3/4', '2']
- self.assert_(keys == theory, 'keys do not match')
+ self.assertTrue(keys == theory, 'keys do not match')
def test_io_4(self):
"io_dates"
View
2  la/util/tests/misc_test.py
@@ -14,7 +14,7 @@ class Test_misc(unittest.TestCase):
def test_randstring_1(self):
"util.misc.randstring_1"
rs = randstring(4)
- self.assert_(len(rs) == 4, 'Wrong length string.')
+ self.assertTrue(len(rs) == 4, 'Wrong length string.')
def test_isa():
"util.misc.isint, isfloat, isscalar"
Please sign in to comment.
Something went wrong with that request. Please try again.