Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F7123321
D5931.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Subscribers
None
D5931.diff
View Options
diff --git a/swh/model/hypothesis_strategies.py b/swh/model/hypothesis_strategies.py
--- a/swh/model/hypothesis_strategies.py
+++ b/swh/model/hypothesis_strategies.py
@@ -102,9 +102,9 @@
@composite
-def urls(draw):
+def iris(draw):
protocol = draw(sampled_from(["git", "http", "https", "deb"]))
- domain = draw(from_regex(r"\A([a-z]([a-z0-9-]*)\.){1,3}[a-z0-9]+\Z"))
+ domain = draw(from_regex(r"\A([a-z]([a-z0-9é🏛️-]*)\.){1,3}([a-z0-9é])+\Z"))
return "%s://%s" % (protocol, domain)
@@ -160,7 +160,7 @@
def origins_d():
- return builds(dict, url=urls())
+ return builds(dict, url=iris())
def origins():
@@ -171,7 +171,7 @@
return builds(
dict,
visit=integers(1, 1000),
- origin=urls(),
+ origin=iris(),
date=aware_datetimes(),
type=pgsql_text(),
)
@@ -189,7 +189,7 @@
return builds(
dict,
visit=integers(1, 1000),
- origin=urls(),
+ origin=iris(),
type=optional(sampled_from(["git", "svn", "pypi", "debian"])),
status=sampled_from(
["created", "ongoing", "full", "partial", "not_found", "failed"]
@@ -423,7 +423,7 @@
def metadata_authorities():
- return builds(MetadataAuthority, url=urls(), metadata=just(None))
+ return builds(MetadataAuthority, url=iris(), metadata=just(None))
def metadata_fetchers():
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Dec 18, 6:41 PM (4 h, 25 m ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3216479
Attached To
D5931: hypothesis_strategies: generate non-ASCII IRIs for origin and authority 'urls'.
Event Timeline
Log In to Comment