Skip to content
Snippets Groups Projects
Commit 4803d786 authored by vlorentz's avatar vlorentz
Browse files

Revert "hypothesis_strategies: Ensure to generate valid directory entry name"

This reverts commit c525484e.
parent f6e0a289
No related branches found
No related tags found
No related merge requests found
......@@ -54,21 +54,17 @@ from .model import (
)
from .swhids import ExtendedObjectType, ExtendedSWHID
def pgsql_alphabet(blacklist_chars=[]):
pgsql_blacklist_chars = ["\u0000"] # postgresql does not like these
return characters(
blacklist_categories=("Cs",),
blacklist_characters=pgsql_blacklist_chars + blacklist_chars,
)
pgsql_alphabet = characters(
blacklist_categories=("Cs",), blacklist_characters=["\u0000"]
) # postgresql does not like these
def optional(strategy):
return one_of(none(), strategy)
def pgsql_text(blacklist_chars=[]):
return text(alphabet=pgsql_alphabet(blacklist_chars))
def pgsql_text():
return text(alphabet=pgsql_alphabet)
def sha1_git():
......@@ -278,7 +274,7 @@ def revisions():
def directory_entries_d():
return builds(
dict,
name=pgsql_text(blacklist_chars=["/"]).map(str.encode),
name=binary(),
target=sha1_git(),
type=sampled_from(["file", "dir", "rev"]),
perms=sampled_from([perm.value for perm in DentryPerms]),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment