def test_units(self): Image._apply_env_variables({'PILLOW_BLOCKS_MAX': '2K'}) self.assertEqual(Image.core.get_blocks_max(), 2 * 1024) Image._apply_env_variables({'PILLOW_BLOCK_SIZE': '2m'}) self.assertEqual(Image.core.get_block_size(), 2 * 1024 * 1024)
def test_units(self): Image._apply_env_variables({"PILLOW_BLOCKS_MAX": "2K"}) self.assertEqual(Image.core.get_blocks_max(), 2 * 1024) Image._apply_env_variables({"PILLOW_BLOCK_SIZE": "2m"}) self.assertEqual(Image.core.get_block_size(), 2 * 1024 * 1024)
def test_units(self): Image._apply_env_variables({'PILLOW_BLOCKS_MAX': '2K'}) self.assertEqual(Image.core.get_blocks_max(), 2*1024) Image._apply_env_variables({'PILLOW_BLOCK_SIZE': '2m'}) self.assertEqual(Image.core.get_block_size(), 2*1024*1024)