Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/json_stream/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,10 @@ def __iter__(self) -> Iterator[str]:
raise NotImplementedError() # pragma: no cover

def __copy__(self):
raise copy.Error("Copying json_steam objects leads to a bad time")
raise copy.Error("Copying json_stream objects leads to a bad time")

def __deepcopy__(self, memo):
raise copy.Error("Copying json_steam objects leads to a bad time")
raise copy.Error("Copying json_stream objects leads to a bad time")


class PersistentStreamingJSONBase(StreamingJSONBase, ABC):
Expand Down
4 changes: 2 additions & 2 deletions src/json_stream/tests/test_loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,9 +177,9 @@ def test_load_nested_transient_first_list_item_list(self):

def test_not_copiable(self):
json_str = '[["a"], "b", "c"]'
with self.assertRaisesRegex(copy.Error, "^Copying json_steam objects leads to a bad time$"):
with self.assertRaisesRegex(copy.Error, "^Copying json_stream objects leads to a bad time$"):
copy.copy(load(StringIO(json_str)))
with self.assertRaisesRegex(copy.Error, "^Copying json_steam objects leads to a bad time$"):
with self.assertRaisesRegex(copy.Error, "^Copying json_stream objects leads to a bad time$"):
copy.deepcopy(load(StringIO(json_str)))

def test_transient_to_persistent(self):
Expand Down
Loading