spanezz / staticsite

Static site generator

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

tests.test_page_filter.TestPageFilter fails

edigiacomo opened this issue · comments

======================================================================
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>

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

Python 3.8.10.

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

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