suds-community / suds

Suds is a lightweight SOAP python client for consuming Web Services. A community fork of the jurko fork.
https://suds.readthedocs.io/
GNU Lesser General Public License v3.0
173 stars 56 forks source link

Remove Python version checks and use of six in tests #87

Closed cjmayo closed 2 years ago

cjmayo commented 2 years ago

There are now 1830 instead of 1846 tests.

6 were already being skipped 4 in TestXLong and 4 in TestXInteger because long does not exist in Python 3 2 had incorrect version skipping (with current pytest anyway), should have been:

--- a/tests/test_xsd_builtins.py
+++ b/tests/test_xsd_builtins.py
@@ -164,10 +164,10 @@

     @pytest.mark.parametrize("source", (
         None,
-        pytest.mark.skipif(sys.version_info >= (3,),
-            reason="int == long since Python 3.0")(long(0)),
-        pytest.mark.skipif(sys.version_info >= (3,),
-            reason="int == long since Python 3.0")(long(1)),
+        pytest.param(long(0), marks=pytest.mark.skipif(sys.version_info >= (3,),
+            reason="int == long since Python 3.0")),
+        pytest.param(long(1), marks=pytest.mark.skipif(sys.version_info >= (3,),
+            reason="int == long since Python 3.0")),
         "x",
         "True",
         "False",
cjmayo commented 2 years ago

Updated to fix the last test being skipped, test_URL_null_bytes. The four instances of that test make a net gain of three tests bringing the total to 1833.

Some more outdated code removed too.

phillbaker commented 2 years ago

Thanks, this looks great!