-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed segfault in iteration over storage plugin names
Also changed plugin help to be a class method.
- Loading branch information
1 parent
122ae41
commit 89da0c6
Showing
8 changed files
with
80 additions
and
22 deletions.
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
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,25 @@ | ||
import dlite | ||
|
||
|
||
# Initially no storage plugins are loaded | ||
assert list(dlite.StoragePluginIter()) == [] | ||
|
||
# Storage plugins can be loaded | ||
dlite.Storage.load_plugins() | ||
|
||
# Now plugins are loaded | ||
plugins = set(dlite.StoragePluginIter()) | ||
assert plugins | ||
assert "json" in plugins | ||
|
||
# Plugins can be iterated over | ||
print("Storage plugins") | ||
plugins2 = set() | ||
for name in dlite.StoragePluginIter(): | ||
print(" -", name) | ||
plugins2.add(name) | ||
assert plugins2 == plugins | ||
|
||
# Unload json plugin | ||
dlite.Storage.unload_plugin("json") | ||
assert "json" not in set(dlite.StoragePluginIter()) |
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
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