diff --git a/requirements/edx/base.txt b/requirements/edx/base.txt index dd7aac186ede..4861b7be1f63 100644 --- a/requirements/edx/base.txt +++ b/requirements/edx/base.txt @@ -1256,7 +1256,7 @@ wheel==0.45.1 # via django-pipeline wrapt==1.17.2 # via -r requirements/edx/kernel.in -xblock[django]==5.1.0 +xblock[django]==5.1.1 # via # -r requirements/edx/kernel.in # acid-xblock diff --git a/requirements/edx/development.txt b/requirements/edx/development.txt index 070b898e7422..ae377bd5cc7c 100644 --- a/requirements/edx/development.txt +++ b/requirements/edx/development.txt @@ -2253,7 +2253,7 @@ wrapt==1.17.2 # -r requirements/edx/doc.txt # -r requirements/edx/testing.txt # astroid -xblock[django]==5.1.0 +xblock[django]==5.1.1 # via # -r requirements/edx/doc.txt # -r requirements/edx/testing.txt diff --git a/requirements/edx/doc.txt b/requirements/edx/doc.txt index 8529d74127d3..354e85c98f55 100644 --- a/requirements/edx/doc.txt +++ b/requirements/edx/doc.txt @@ -1583,7 +1583,7 @@ wrapt==1.17.2 # via # -r requirements/edx/base.txt # astroid -xblock[django]==5.1.0 +xblock[django]==5.1.1 # via # -r requirements/edx/base.txt # acid-xblock diff --git a/requirements/edx/testing.txt b/requirements/edx/testing.txt index 2e9ff968b70b..799f8b16ed26 100644 --- a/requirements/edx/testing.txt +++ b/requirements/edx/testing.txt @@ -1673,7 +1673,7 @@ wrapt==1.17.2 # via # -r requirements/edx/base.txt # astroid -xblock[django]==5.1.0 +xblock[django]==5.1.1 # via # -r requirements/edx/base.txt # acid-xblock diff --git a/xmodule/tests/test_export.py b/xmodule/tests/test_export.py index 5a52d145a5f0..e4a5cbcdae4f 100644 --- a/xmodule/tests/test_export.py +++ b/xmodule/tests/test_export.py @@ -143,9 +143,22 @@ def test_export_roundtrip(self, course_dir, mock_get): print("Checking block equality") for location in initial_import.modules[course_id].keys(): - print(("Checking", location)) - assert blocks_are_equivalent(initial_import.modules[course_id][location], - second_import.modules[course_id][location]) + initial_block = initial_import.modules[course_id][location] + reimported_block = second_import.modules[course_id][location] + if location.block_type == "error": + # Error blocks store their stacktrace as a field on the block + # itself. We cache failed XBlock tag -> class lookups, so a + # PluginError raised from the uncached state vs cached state + # will generate different stacktraces, making the two blocks + # "different" as far as blocks_are_equivalent() is concerned. It + # doesn't *really* matter if the stacktraces are different + # though, so we'll do a much less thorough comparison for error + # blocks: + assert type(initial_block) == type(reimported_block) # pylint:disable=unidiomatic-typecheck + assert initial_block.display_name == reimported_block.display_name + else: + print(("Checking", location)) + assert blocks_are_equivalent(initial_block, reimported_block) class TestEdxJsonEncoder(unittest.TestCase):