[PATCH 04 of 52 Narval cube] [new style] use unittest from std lib

Nsukami Patrick ptrck at nskm.xyz
Wed Apr 1 11:34:04 CEST 2020


# HG changeset patch
# User Nsukami Patrick <ptrck at nskm dot xyz>
# Date 1585406297 0
#      Sat Mar 28 14:38:17 2020 +0000
# Node ID e9ac4086dec687e20ae20d68a9cb4e0516200485
# Parent  1dc8712c2f95c94c06570307df74a975d5b70ea6
[new style] use unittest from std lib

diff --git a/test/test_functional.py b/test/test_functional.py
--- a/test/test_functional.py
+++ b/test/test_functional.py
@@ -102,5 +102,5 @@
             self.assertIn('banzai!', cwplan.execution_log[0].data.read())
 
 if __name__ == '__main__':
-    from logilab.common.testlib import unittest_main
-    unittest_main()
+    import unittest
+    unittest.main()
diff --git a/test/test_narval.py b/test/test_narval.py
--- a/test/test_narval.py
+++ b/test/test_narval.py
@@ -17,7 +17,7 @@
 # with narval.  If not, see <http://www.gnu.org/licenses/>.
 """cubicweb-narval automatic tests"""
 
-from logilab.common.testlib import unittest_main
+import unittest
 
 from cubicweb.devtools.testlib import AutomaticWebTest
 
@@ -34,4 +34,4 @@
 
 
 if __name__ == '__main__':
-    unittest_main()
+    unittest.main()
diff --git a/test/unittest_security.py b/test/unittest_security.py
--- a/test/unittest_security.py
+++ b/test/unittest_security.py
@@ -58,5 +58,5 @@
             cnx.commit()
 
 if __name__ == '__main__':
-    from logilab.common.testlib import unittest_main
-    unittest_main()
+    import unittest
+    unittest.main()
diff --git a/test/unittest_views.py b/test/unittest_views.py
--- a/test/unittest_views.py
+++ b/test/unittest_views.py
@@ -58,5 +58,5 @@
             self.assertIn(str(plan_first.eid), plans[2])
 
 if __name__ == '__main__':
-    from logilab.common.testlib import unittest_main
-    unittest_main()
+    import unittest
+    unittest.main()




More information about the cubicweb-devel mailing list