-
Notifications
You must be signed in to change notification settings - Fork 423
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
libpostal_setup() only works once #6
Comments
Fixed with 12816d0 In general libpostal_setup/libpostal_teardown are relatively expensive calls as they load models from disk and are only supposed to run once per application (e.g. in a dynamic language like Python these would run at module import time). Unless you're testing whether libpostal's setup works (though they're not currently on Github, libpostal has its own tests which can do that), I wouldn't recommend more than one call to setup and one call to teardown in the entire program. Also note: libpostal is not thread-safe, so if the tests are threaded it might be problematic. |
Understood, thank you. On Mon, Sep 28, 2015 at 5:44 PM, Al Barrentine notifications@github.com
Anatoly "Tolya" Boshkin |
Al,
libpostal_setup() only works once, all subsequent calls fail, regardless of calls to libpostal_teardown() in between, the error message is:
I guess a given app is not likely to call setup/teardown more than once per run, so this is not a big deal. My context is a test suite that tries to separate test cases cleanly, thus multiple setup/teardown call pairs.
Thank you,
Anatoly
The text was updated successfully, but these errors were encountered: