tests.test_page_filter.TestPageFilter fails
edigiacomo opened this issue · comments
Emanuele Di Giacomo commented
======================================================================
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>
Enrico Zini commented
I seem to be unable to reproduce it. What version of Python are you using?
Emanuele Di Giacomo commented
Python 3.8.10.
Enrico Zini commented
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
Enrico Zini commented
I tried to build in a sid chroot and there I can reproduce it. Working on it