spanezz / staticsite

Static site generator
GNU General Public License v3.0
47 stars 7 forks source link

tests.test_page_filter.TestPageFilter fails #54

Closed edigiacomo closed 2 years ago

edigiacomo commented 3 years ago
======================================================================
FAIL: test_site (tests.test_page_filter.TestPageFilter)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/edg/devel/fork/staticsite/tests/test_page_filter.py", line 22, in test_site
    self.assertEqual(select(site, path="blog/*"), [
AssertionError: Lists differ: ['/blog/post2', '/blog/post1'] != ['/blog/post1', '/blog/post2']

First differing element 0:
'/blog/post2'
'/blog/post1'

- ['/blog/post2', '/blog/post1']
+ ['/blog/post1', '/blog/post2']

----------------------------------------------------------------------
Ran 56 tests in 3.283s

FAILED (failures=1)
Test failed: <unittest.runner.TextTestResult run=56 errors=0 failures=1>
error: Test failed: <unittest.runner.TextTestResult run=56 errors=0 failures=1>
spanezz commented 3 years ago

I seem to be unable to reproduce it. What version of Python are you using?

edigiacomo commented 3 years ago

Python 3.8.10.

spanezz commented 2 years ago

I didn't manage to try python 3.8, but I still couldn't reproduce this with python3.9 or python 3.10, and insertion ordering of dicts was alredy present in python 3.8. If you still see the problem, I guess we can replace assertEqual with assertCountEqual

spanezz commented 2 years ago

I tried to build in a sid chroot and there I can reproduce it. Working on it