changeset 51:e1eb45c4763e

[compat] fix variable scoping for py3
author Jeff Hammel <k0scist@gmail.com>
date Sun, 17 Sep 2017 18:08:55 -0700
parents 4b20694b8a16
children 0b3daccfc36c
files tests/test_unique.py
diffstat 1 files changed, 7 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test_unique.py	Sun Sep 17 14:28:36 2017 -0700
+++ b/tests/test_unique.py	Sun Sep 17 18:08:55 2017 -0700
@@ -1,5 +1,9 @@
 #!/usr/bin/env python
 
+"""
+test uniqueness of set elements
+"""
+
 import os
 import unittest
 from tvii.unique import unique
@@ -18,13 +22,12 @@
         """what if a set is not unique?"""
 
         data = [1,2,3,4]
-        e = None
         try:
             unique(data)
+            assert 1 == 0
         except NotUnique as e:
-            pass
-        assert e is not None
-        assert isinstance(e, NotUnique)
+            assert (e is not None)
+            assert isinstance(e, NotUnique)
 
 if __name__ == '__main__':
     unittest.main()