diff options
| author | Ran Benita <ran234@gmail.com> | 2019-05-03 13:03:14 +0300 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2023-06-08 09:15:40 +0200 |
| commit | a57d5d9bbc27a7c3f18e14f68cfc74477b50eda0 (patch) | |
| tree | 339a18594afa87f41800a641e342cc9382106297 /tests/utils_tests | |
| parent | 459f30f73e489356cf128abb3e9f357a7bffed0a (diff) | |
Made bytes and str return types no longer mutually exclusive in lazy().
They are no longer special cased.
Diffstat (limited to 'tests/utils_tests')
| -rw-r--r-- | tests/utils_tests/test_functional.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/tests/utils_tests/test_functional.py b/tests/utils_tests/test_functional.py index cc4409d893..9a5cbfe068 100644 --- a/tests/utils_tests/test_functional.py +++ b/tests/utils_tests/test_functional.py @@ -234,9 +234,7 @@ class FunctionalTests(SimpleTestCase): def test_lazy_bytes_and_str_result_classes(self): lazy_obj = lazy(lambda: "test", str, bytes) - msg = "Cannot call lazy() with both bytes and text return types." - with self.assertRaisesMessage(ValueError, msg): - lazy_obj() + self.assertEqual(str(lazy_obj()), "test") def test_lazy_str_cast_mixed_result_types(self): lazy_value = lazy(lambda: [1], str, list)() |
