-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove deprecated
pkg_resources
(#1166)
* Replace `pkg_resources` with `importlib` * Update requirements * Add test to make sure we can read examples from README
- Loading branch information
Showing
6 changed files
with
91 additions
and
50 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
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,21 @@ | ||
from json import loads | ||
from pathlib import Path | ||
|
||
from nmodl import dsl | ||
|
||
|
||
def test_example(): | ||
""" | ||
Test for the Python API from example | ||
""" | ||
|
||
examples = dsl.list_examples() | ||
|
||
# ordering may be off so we use a set | ||
assert set(examples) == {"exp2syn.mod", "expsyn.mod", "hh.mod", "passive.mod"} | ||
|
||
driver = dsl.NmodlDriver() | ||
for example in examples: | ||
nmodl_string = dsl.load_example(example) | ||
# make sure we can parse the string | ||
assert driver.parse_string(nmodl_string) |