aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Harder <radhermit@gmail.com>2017-12-21 08:23:35 -0500
committerTim Harder <radhermit@gmail.com>2018-04-11 14:39:31 -0400
commit4f1de96684eb4a87458aeefa0b85770bc1aeeab5 (patch)
tree490e6a895c801b6ac1917d5ebd7a590f14fc4621 /tests/test_source_hygene.py
parentsetup.cfg: add pytest settings (diff)
downloadsnakeoil-4f1de96684eb4a87458aeefa0b85770bc1aeeab5.tar.gz
snakeoil-4f1de96684eb4a87458aeefa0b85770bc1aeeab5.tar.bz2
snakeoil-4f1de96684eb4a87458aeefa0b85770bc1aeeab5.zip
test: initial conversion from unittest to pytest functionality
Diffstat (limited to 'tests/test_source_hygene.py')
-rw-r--r--tests/test_source_hygene.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/tests/test_source_hygene.py b/tests/test_source_hygene.py
index d6d8d68..9d9c7c3 100644
--- a/tests/test_source_hygene.py
+++ b/tests/test_source_hygene.py
@@ -1,10 +1,10 @@
# Copyright: 2010-2011 Brian Harring <ferringb@gmail.com>
# License: GPL2/BSD 3 clause
-from snakeoil.test import TestCase, mixins
+from snakeoil.test import mixins
-class Test_modules(mixins.PythonNamespaceWalker, TestCase):
+class Test_modules(mixins.PythonNamespaceWalker):
target_namespace = 'snakeoil'
@@ -14,5 +14,4 @@ class Test_modules(mixins.PythonNamespaceWalker, TestCase):
for target in getattr(module, '__all__', ()):
if not hasattr(module, target):
failures.append((module, target))
- if failures:
- self.fail("nonexistent __all__ targets spotted: %s" % (failures,))
+ assert not failures, "nonexistent __all__ targets spotted: %s" % (failures,)