a couple of tests fail
See original GitHub issue========================================================================================================== test session starts ==========================================================================================================
platform darwin -- Python 3.7.6, pytest-5.4.1, py-1.8.1, pluggy-0.13.1
rootdir: /path/to/scourgify/scourgify/usaddress-scourgify-0.1.11
collected 25 items
scourgify/tests/test_address_normalization.py ............F........... [ 96%]
scourgify/tests/test_cleaning.py F [100%]
=============================================================================================================== FAILURES ================================================================================================================
_____________________________________________________________________________________ TestAddressNormalizationUtils.test_handle_abnormal_occupancy ______________________________________________________________________________________
self = <scourgify.tests.test_address_normalization.TestAddressNormalizationUtils testMethod=test_handle_abnormal_occupancy>
def test_handle_abnormal_occupancy(self):
addr_str = '123 SW MAIN UN'
expected = OrderedDict([
('AddressNumber', '123'),
('StreetNamePreDirectional', 'SW'),
('StreetName', 'MAIN'),
('StreetNamePostType', 'UN'),
])
result = parse_address_string(addr_str)
self.assertEqual(expected, result)
addr_str = '123 SW MAIN UN A'
expected = OrderedDict([
('AddressNumber', '123'),
('StreetNamePreDirectional', 'SW'),
('StreetName', 'MAIN'),
('OccupancyType', 'UN'),
('OccupancyIdentifier', 'A')
])
result = parse_address_string(addr_str)
> self.assertEqual(expected, result)
E AssertionError: Order[91 chars]), ('OccupancyType', 'UN'), ('OccupancyIdentifier', 'A')]) != Order[91 chars]), ('StreetNamePostType', 'UN'), ('OccupancyIdentifier', 'A')])
scourgify/tests/test_address_normalization.py:650: AssertionError
________________________________________________________________________________________________ CleaningTests.test_strip_occupancy_type ________________________________________________________________________________________________
self = <scourgify.tests.test_cleaning.CleaningTests testMethod=test_strip_occupancy_type>
def test_strip_occupancy_type(self):
expected = '33'
line2 = 'Unit 33'
result = strip_occupancy_type(line2)
self.assertEqual(result, expected)
line2 = 'Apartment 33'
result = strip_occupancy_type(line2)
self.assertEqual(result, expected)
line2 = 'Unit #33'
result = strip_occupancy_type(line2)
self.assertEqual(result, expected)
line2 = 'Building 3 Unit 33'
result = strip_occupancy_type(line2)
self.assertEqual(result, expected)
line2 = 'Building 3 UN 33'
result = strip_occupancy_type(line2)
> self.assertEqual(result, expected)
E AssertionError: '3 UN 33' != '33'
E - 3 UN 33
E + 33
scourgify/tests/test_cleaning.py:38: AssertionError
--------------------------------------------------------------------------------------------------------- Captured stdout call ----------------------------------------------------------------------------------------------------------
['3', 'UN', '33']
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
The Test-Fail Dynamic In Couples And What To Do About It
The test-fail pattern consists of one partner presenting the other with an objective that they cannot seem to achieve. They may be limited...
Read more >What To Do When Tests Fail? - TestProject
What Should I Do When a Test Fails? ... Tests usually fail due to server and network issues, an unresponsive application or validation...
Read more >Tests that sometimes fail | Hacker News
We've had a couple of cases of flaky tests failing builds over the last two years at my company. Most often it's browser...
Read more >A couple meme tests fail #10 - GitHub
ERROR : /meme-5.0.5/tests/scripts/dreme.test (FAULT IN TEST!) FAIL: meme-chip1 (CRASH!) There's a solution suggested here: Nevermind, I got it.
Read more >How to Fix Flaky Tests - Semaphore CI
Randomly failing tests are the hardest to debug. Here's a framework you can use to fix them and keep your test suite healthy....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Excellent! I’m glad we were able to work through it!
Thank you! I’m not too familiar with tox, but I see why now, and I can make it work with