Open westurner opened 1 year ago
[ ] main.py: with console_script entrypoints, you can generate a bin/scriptname.py script given a (testable) named main() callable:
console_script
main()
def main(argv=None): argv = argv if argv is not None else [] RETURN_OK = 0 return RETURN_OK def test_main(args): retcode = main(["-h"]) assert retcode retcode = main(["--help"]) assert retcode retcode = main(["--test"]) # subprocess.call(["pytest", "--cov=", "--cov-report=term-missing", path='.'])
https://github.com/lexiq-legal/pydantic_schemaorg/blob/main/pyproject.toml
https://github.com/lexiq-legal/pydantic_schemaorg/issues/7
(opts, args)
[ ] main.py: with
console_script
entrypoints, you can generate a bin/scriptname.py script given a (testable) namedmain()
callable:https://github.com/lexiq-legal/pydantic_schemaorg/blob/main/pyproject.toml
https://github.com/lexiq-legal/pydantic_schemaorg/issues/7
(opts, args)
: https://github.com/westurner/dotvim/blob/9a2876d459be52710d0ce9c5bcedfe26fc3c9d42/snippets-ulti/python.snippets#L117-L120