City-Bureau / city-scrapers

Scrape, standardize and share public meetings from local government websites
https://cityscrapers.org
MIT License
332 stars 310 forks source link

Add il_procurement_policy #0806 #925

Closed jingwu21 closed 4 years ago

jingwu21 commented 4 years ago

Resolve #806 All tests have passed.

jingwu21 commented 4 years ago

Hello, @pjsier. I made the changes you requested. I made sure to run flake8, isort, and yapf on my local environment but somehow it fails the CI Checks here. Not quite sure whats wrong. Any help would be appreciated.

jingwu21 commented 4 years ago

@pjsier. I am not quite sure where the assert FakeDateTime comes from.

def test_prev_start():
>       assert parsed_items_prev[0]["start"] == datetime(2019, 2, 27, 10, 0)
E       assert FakeDatetime(2017, 2, 24, 10, 0) == FakeDatetime(2019, 2, 27, 10, 0)
E        +  where FakeDatetime(2019, 2, 27, 10, 0) = datetime(2019, 2, 27, 10, 0)

tests/test_il_procurement_policy.py:97: AssertionError

It passes pytest locally but FakeDatetime keeps appearing for my CI checks.

pjsier commented 4 years ago

The issue isn't about the FakeDatetime class, it looks like it's about dictionaries not being sorted by default in Python 3.5. If you sort them like this it should pass https://github.com/City-Bureau/city-scrapers/blob/51db93bfc876ed51dc27df651832bce53bf4c6ac/tests/test_chi_ssa_29.py#L21