-
Notifications
You must be signed in to change notification settings - Fork 560
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1626 from edmondchuc/feat/DefinedNamespaces-dir
Add __dir__ to DefinedNamespaceMeta.
- Loading branch information
Showing
2 changed files
with
40 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
from rdflib import RDF | ||
|
||
|
||
def test_definednamespace_dir(): | ||
x = dir(RDF) | ||
|
||
values = [ | ||
RDF.nil, | ||
RDF.direction, | ||
RDF.first, | ||
RDF.language, | ||
RDF.object, | ||
RDF.predicate, | ||
RDF.rest, | ||
RDF.subject, | ||
RDF.type, | ||
RDF.value, | ||
RDF.Alt, | ||
RDF.Bag, | ||
RDF.CompoundLiteral, | ||
RDF.List, | ||
RDF.Property, | ||
RDF.Seq, | ||
RDF.Statement, | ||
RDF.HTML, | ||
RDF.JSON, | ||
RDF.PlainLiteral, | ||
RDF.XMLLiteral, | ||
RDF.langString, | ||
] | ||
|
||
assert len(values) == len(x) | ||
|
||
for value in values: | ||
assert value in x |