From 6c877a174974652c67d244d0b1c5f44493b3afc1 Mon Sep 17 00:00:00 2001 From: Rishab Malik Date: Fri, 28 Jun 2019 13:03:55 -0400 Subject: [PATCH] added skip decorator for python2 --- tests/unit/test_response.py | 63 ++++++++++++++----------------------- 1 file changed, 23 insertions(+), 40 deletions(-) diff --git a/tests/unit/test_response.py b/tests/unit/test_response.py index 01411ac..cde3e33 100644 --- a/tests/unit/test_response.py +++ b/tests/unit/test_response.py @@ -1,5 +1,8 @@ # coding: UTF-8 import io +import unittest + +import six from vcr.stubs import VCRHTTPResponse @@ -70,6 +73,7 @@ def test_response_headers_should_have_correct_values(): assert response.headers.get('date') == "Fri, 24 Oct 2014 18:35:37 GMT" +@unittest.skipIf(six.PY2, "Regression test for Python3 only") def test_response_parses_correctly_and_fp_attribute_error_is_not_thrown(): """ Regression test for https://github.com/kevin1024/vcrpy/issues/440 @@ -90,46 +94,25 @@ def test_response_parses_correctly_and_fp_attribute_error_is_not_thrown(): "content-type": ["text/html; charset=utf-8"], }, "body": { - "string": b"\nPMID- 19416910\nOWN - NLM\nSTAT- MEDLINE\nDA - 20090513\nDCOM- 20090622\nLR - " - b"20141209\nIS - 1091-6490 (Electronic)\nIS - 0027-8424 (Linking)\nVI - 106\nIP - " - b"19\nDP - 2009 May 12\nTI - Genetic dissection of histone deacetylase requirement in " - b"tumor cells.\nPG - 7751-5\nLID - 10.1073/pnas.0903139106 [doi]\nAB - Histone " - b"deacetylase inhibitors (HDACi) represent a new group of drugs currently\n being " - b"tested in a wide variety of clinical applications. They are especially\n effective " - b"in preclinical models of cancer where they show antiproliferative\n action in many " - b"different types of cancer cells. Recently, the first HDACi was\n approved for the " - b"treatment of cutaneous T cell lymphomas. Most HDACi currently in\n clinical " - b"development act by unspecifically interfering with the enzymatic\n activity of all " - b"class I HDACs (HDAC1, 2, 3, and 8), and it is widely believed\n that the development " - b"of isoform-specific HDACi could lead to better therapeutic\n efficacy. The " - b"contribution of the individual class I HDACs to different disease\n states, however, " - b"has so far not been fully elucidated. Here, we use a genetic\n approach to dissect " - b"the involvement of the different class I HDACs in tumor\n cells. We show that " - b"deletion of a single HDAC is not sufficient to induce cell\n death, but that HDAC1 " - b"and 2 play redundant and essential roles in tumor cell\n survival. Their deletion " - b"leads to nuclear bridging, nuclear fragmentation, and\n mitotic catastrophe, " - b"mirroring the effects of HDACi on cancer cells. These\n findings suggest that " - b"pharmacological inhibition of HDAC1 and 2 may be sufficient\n for anticancer " - b"activity, providing an experimental framework for the development \n of " - b"isoform-specific HDAC inhibitors.\nFAU - Haberland, Michael\nAU - Haberland M\nAD - " - b"Department of Molecular Biology, University of Texas Southwestern Medical Center," - b"\n 5323 Harry Hines Boulevard, Dallas, TX 75390-9148, USA.\nFAU - Johnson, " - b"Aaron\nAU - Johnson A\nFAU - Mokalled, Mayssa H\nAU - Mokalled MH\nFAU - Montgomery, " - b"Rusty L\nAU - Montgomery RL\nFAU - Olson, Eric N\nAU - Olson EN\nLA - eng\nPT - " - b"Journal Article\nPT - Research Support, N.I.H., Extramural\nPT - Research Support, " - b"Non-U.S. Gov't\nDEP - 20090429\nPL - United States\nTA - Proc Natl Acad Sci U S A\nJT " - b"- Proceedings of the National Academy of Sciences of the United States of America\nJID - " - b"7505876\nRN - 0 (Antineoplastic Agents)\nRN - 0 (Histone Deacetylase Inhibitors)\nRN - " - b"0 (Protein Isoforms)\nRN - EC 3.5.1.98 (Histone Deacetylases)\nSB - IM\nMH - " - b"Animals\nMH - Antineoplastic Agents/pharmacology\nMH - Cell Death\nMH - Cell Line, " - b"Tumor\nMH - Cell Survival\nMH - Gene Expression Regulation, Enzymologic\nMH - Gene " - b"Expression Regulation, Neoplastic\nMH - Histone Deacetylase Inhibitors\nMH - Histone " - b"Deacetylases/*genetics/*physiology\nMH - Humans\nMH - Mice\nMH - Mice, Nude\nMH - " - b"Models, Genetic\nMH - Neoplasm Transplantation\nMH - Neoplasms/metabolism\nMH - " - b"Protein Isoforms\nPMC - PMC2683118\nOID - NLM: PMC2683118\nEDAT- 2009/05/07 09:00\nMHDA- " - b"2009/06/23 09:00\nCRDT- 2009/05/07 09:00\nAID - 0903139106 [pii]\nAID - " - b"10.1073/pnas.0903139106 [doi]\nPST - ppublish\nSO - Proc Natl Acad Sci U S A. 2009 May " - b"12;106(19):7751-5. doi:\n 10.1073/pnas.0903139106. Epub 2009 Apr 29.\n " + "string": b"\nPMID- 19416910\nOWN - NLM\nSTAT- MEDLINE\nDA - 20090513\nDCOM- " + b"20090622\nLR - " + b"20141209\nIS - 1091-6490 (Electronic)\nIS - 0027-8424 (Linking)\nVI - " + b"106\nIP - " + b"19\nDP - 2009 May 12\nTI - Genetic dissection of histone deacetylase " + b"requirement in " + b"tumor cells.\nPG - 7751-5\nLID - 10.1073/pnas.0903139106 [doi]\nAB - " + b"Histone " + b"deacetylase inhibitors (HDACi) represent a new group of drugs currently\n " + b" being " + b"tested in a wide variety of clinical applications. They are especially\n " + b" effective " + b"in preclinical models of cancer where they show antiproliferative\n " + b"action in many " + b"different types of cancer cells. Recently, the first HDACi was\n " + b"approved for the " + b"treatment of cutaneous T cell lymphomas. Most HDACi currently in\n " + b"clinical " + } } vcr_response = VCRHTTPResponse(recorded_response)