  
  
  if not is_python2:
  
      class TestToDiskResourceWarningUnittest(TestCase):
          def test_resource_warning(self):
              scenarios = zip(*objects_to_test)
  
              for scenario in scenarios:
                  with self.subTest(msg=scenario[1]):
                      warnings_list = write_obj_and_catch_warnings(scenario[0])
                      self.assertEqual(len(warnings_list), 0)
 
</s> remove if not is_python2:
 </s> add class TestToDiskResourceWarningUnittest(TestCase):
    def test_resource_warning(self):
        scenarios = zip(*objects_to_test) </s> remove @pytest.mark.skipif(is_python2, reason="ResourceWarning needs Python 3.x")
 </s> add  </s> remove @pytest.mark.skipif(is_python2, reason="ResourceWarning needs Python 3.x")
 </s> add  </s> remove @pytest.mark.skipif(is_python2, reason="Dict order? Not sure if worth investigating")
 </s> add  </s> remove @pytest.mark.skipif(is_python2, reason="Dict order? Not sure if worth investigating")
 </s> add 
        for scenario in scenarios:
            with self.subTest(msg=scenario[1]):
                warnings_list = write_obj_and_catch_warnings(scenario[0])
                self.assertEqual(len(warnings_list), 0)
  
  
  if not is_python2:
  
        for scenario in scenarios:
            with self.subTest(msg=scenario[1]):
                warnings_list = write_obj_and_catch_warnings(scenario[0])
                self.assertEqual(len(warnings_list), 0)
        for scenario in scenarios:
            with self.subTest(msg=scenario[1]):
                warnings_list = write_obj_and_catch_warnings(scenario[0])
                self.assertEqual(len(warnings_list), 0)
        for scenario in scenarios:
            with self.subTest(msg=scenario[1]):
                warnings_list = write_obj_and_catch_warnings(scenario[0])
                self.assertEqual(len(warnings_list), 0)
        for scenario in scenarios:
            with self.subTest(msg=scenario[1]):
                warnings_list = write_obj_and_catch_warnings(scenario[0])
                self.assertEqual(len(warnings_list), 0)
        for scenario in scenarios:
            with self.subTest(msg=scenario[1]):
                warnings_list = write_obj_and_catch_warnings(scenario[0])
                self.assertEqual(len(warnings_list), 0)
        for scenario in scenarios:
            with self.subTest(msg=scenario[1]):
                warnings_list = write_obj_and_catch_warnings(scenario[0])
                self.assertEqual(len(warnings_list), 0)
        for scenario in scenarios:
            with self.subTest(msg=scenario[1]):
                warnings_list = write_obj_and_catch_warnings(scenario[0])
                self.assertEqual(len(warnings_list), 0)
        for scenario in scenarios:
            with self.subTest(msg=scenario[1]):
                warnings_list = write_obj_and_catch_warnings(scenario[0])
                self.assertEqual(len(warnings_list), 0)
keep keep keep keep replace replace replace replace replace replace replace replace
 Remove references to Python 2 / is_python2 
spacy/tests/regression/test_issue5230.py