Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

python-purl outdated #266

Open
pgajdos opened this issue Nov 5, 2024 · 1 comment
Open

python-purl outdated #266

pgajdos opened this issue Nov 5, 2024 · 1 comment

Comments

@pgajdos
Copy link

pgajdos commented Nov 5, 2024

Hello,

python-purl looks not under development. Could you eventually consider to use another library or drop this single test?

@pgajdos
Copy link
Author

pgajdos commented Nov 5, 2024

Or, make it optional:

Index: requests-mock-1.12.1/tests/test_adapter.py
===================================================================
--- requests-mock-1.12.1.orig/tests/test_adapter.py
+++ requests-mock-1.12.1/tests/test_adapter.py
@@ -14,9 +14,14 @@ import http.client
 import io
 import json
 import re
+import unittest
 import urllib.parse

-import purl
+with_purl = True
+try:
+  import purl
+except:
+  with_purl = False
 import requests
 from urllib3 import HTTPResponse

@@ -345,6 +350,7 @@ class SessionAdapterTests(base.TestCase)
             resp = self.session.get(u)
             self.assertEqual('resp', resp.text)

+    @unittest.skipUnless(with_purl, "purl not available")
     def test_with_purl(self):
         self.adapter.register_uri('GET',
                                   purl.URL('mock://www.tester.com/a'),

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant