Download gpt2eval_env/lib/python3.11/site-packages/setuptools/tests/test_depends.py from michaelxing/gpt2-small-repla: direct link, hf CLI and curl.
- Browser
- Download file 424 Bytes
-
https://huggingface.co/michaelxing/gpt2-small-repla/resolve/main/gpt2eval_env/lib/python3.11/site-packages/setuptools/tests/test_depends.py
- Command line
-
hf download hf://michaelxing/gpt2-small-repla/gpt2eval_env/lib/python3.11/site-packages/setuptools/tests/test_depends.py
-
curl -L -o test_depends.py https://huggingface.co/michaelxing/gpt2-small-repla/resolve/main/gpt2eval_env/lib/python3.11/site-packages/setuptools/tests/test_depends.py
424 Bytes
| import sys | |
| from setuptools import depends | |
| class TestGetModuleConstant: | |
| def test_basic(self): | |
| """ | |
| Invoke get_module_constant on a module in | |
| the test package. | |
| """ | |
| mod_name = 'setuptools.tests.mod_with_constant' | |
| val = depends.get_module_constant(mod_name, 'value') | |
| assert val == 'three, sir!' | |
| assert 'setuptools.tests.mod_with_constant' not in sys.modules | |