Closed zyxue closed 4 years ago
The zip file releases are missing the "scourgify/tests/config/address_constants.yaml" file. I have tried a couple of things, but cannot figure out why the build is excluding that file. If you can help me figure out how to ensure that file is included in the build, I would be happy to roll out a new release which includes that file. Lacking that, you will need to grab the file from the repo and tell your testing environment where the file is, such as is done through tox's setenv
I just cloned your repo, install the dependencies, and run,
tree scourgify/tests/
scourgify/tests/
├── __init__.py
├── config
│ └── address_constants.yaml
├── test_address_normalization.py
└── test_cleaning.py
pytest scourgify/tests/
it still produces the same error, are you sure it's due to missing the config/address_constants.yaml
file?
It looks like you are just calling the tests directly, rather than using tox. If you look at the tox.ini you can see that it specifies a testing environmental variable for ADDRESS_CONFIG_DIR using setenv.
Per the "Installation" instructions in the README, "To use a custom constants yaml, set the ADDRESS_CONFIG_DIR environment variable with the full path to the directory containing your address_constants.yaml file"
The tests that are failing for you are testing the behavior of being able to use custom constants. So it is a combination of the missing config/address_constants.yaml
and the environment variable not being set during the test run
Thank you! I'm not too familiar with tox, but I see why now, and I can make it work with
ADDRESS_CONFIG_DIR=${PWD}/scourgify/tests/config pytest scourgify/tests
Excellent! I'm glad we were able to work through it!
https://files.pythonhosted.org/packages/7c/43/734f8aad7f4d3f5ba02a52696dcead52a6d2d8b66f4fa98523e5b806a662/usaddress-scourgify-0.1.11.tar.gz