mirror of
https://github.com/wiltodelta/remove-ai-watermarks.git
synced 2026-09-02 02:30:48 +02:00
Unplug lattice detector from package, expand research docs
This commit is contained in:
+7
-3
@@ -18,12 +18,10 @@ CHATGPT = SAMPLES / "chatgpt-1.png"
|
||||
|
||||
class TestTopLevelExports:
|
||||
def test_lazy_reexports_resolve(self):
|
||||
from remove_ai_watermarks import openai_provenance, synthid_detector
|
||||
from remove_ai_watermarks import openai_provenance
|
||||
|
||||
assert raiw.remove_visible is api.remove_visible
|
||||
assert raiw.visible_provenance is api.visible_provenance
|
||||
assert raiw.detect_synthid is synthid_detector.detect_synthid
|
||||
assert raiw.SynthIDDetection is synthid_detector.SynthIDDetection
|
||||
assert raiw.verify_openai_synthid is openai_provenance.verify_openai_synthid
|
||||
assert raiw.OpenAIProvenanceError is openai_provenance.OpenAIProvenanceError
|
||||
assert raiw.OpenAISynthIDDetection is openai_provenance.OpenAISynthIDDetection
|
||||
@@ -32,6 +30,12 @@ class TestTopLevelExports:
|
||||
with pytest.raises(AttributeError):
|
||||
_ = raiw.does_not_exist
|
||||
|
||||
def test_local_synthid_detector_is_not_a_package_export(self):
|
||||
with pytest.raises(AttributeError):
|
||||
_ = raiw.detect_synthid
|
||||
with pytest.raises(AttributeError):
|
||||
_ = raiw.SynthIDDetection
|
||||
|
||||
def test_bare_import_is_light(self):
|
||||
# importing the package must not pull the heavy cv2/torch stack (PEP 562 lazy).
|
||||
# Checked in a FRESH interpreter -- another test in this process may already
|
||||
|
||||
Reference in New Issue
Block a user