Jul
08
2010

How to run a single unit test/unit test module with py.test

Note to self: It is actually possible to select a single test module or a single test function in py.test.

But passing the file name as argument to a py.test invocation selects only the doctest from that file (wtf!?). Instead, you need to call it like this:

$ py.test -k test_module    # to run the tests from test_module.py
$ py.test -k test_func      # to run tests having the function name test_func

This is documented in the section advanced test selection and running modes of the py.test documentation, although I fail to see how this is advanced.

tags: ,
posted in How-To, Python by admin

Follow comments via the RSS Feed | Leave a comment | Trackback URL

136 Comments to "How to run a single unit test/unit test module with py.test"

  1. Alexander7 wrote:

    buy@generic.LEVITRA” rel=”nofollow”>…

    Need cheap generic LEVITRA?…

  2. FREDDIE wrote:

    Buy@Cheap.Coral.Calcium” rel=”nofollow”>…

    Buywithout prescription…

  3. PERRY wrote:

    Purchase@Coral.Calcium.Online” rel=”nofollow”>…

    Buywithout prescription…

  4. LEWIS wrote:

    Purchase@Cheap.Coral.Calcium” rel=”nofollow”>..

    Buynow it…

  5. OTIS wrote:

    Purchase@Abana.Online” rel=”nofollow”>..

    Buydrugs without prescription…

  6. LEO wrote:

    Purchase@Cheap.Abana” rel=”nofollow”>…

    Buygeneric pills…

  7. TERRENCE wrote:

    Get@Abana.Online” rel=”nofollow”>..

    Buyit now…

  8. SALVADOR wrote:

    Buy@Abilify.Online” rel=”nofollow”>..

    Buygeneric meds…

  9. RONNIE wrote:

    Buy@Cheap.Abilify” rel=”nofollow”>..

    Buynow it…

  10. DUSTIN wrote:

    Get@Abilify.Online” rel=”nofollow”>..

    Buygeneric drugs…

  11. ENRIQUE wrote:

    Cheap@Abilify.Without.Prescription” rel=”nofollow”>.

    Buynow it…

  12. EDUARDO wrote:

    Cheap@Generic.Abilify.5mg.10mg.15mg.20mg.30mg” rel=”nofollow”>..

    Buygeneric pills…

  13. WALLACE wrote:

    Get@Acai.Online” rel=”nofollow”>…

    Buygeneric drugs…

  14. RUSSELL wrote:

    Order@Generic.Acai” rel=”nofollow”>..

    Buywithout prescription…

  15. BRANDON wrote:

    Cheap@Coral.Calcium.Online” rel=”nofollow”>..

    Buyno prescription…

  16. ARTHUR wrote:

    Buy@Coral.Calcium.Online” rel=”nofollow”>.…

    Buygeneric meds…

  17. GABRIEL wrote:

    Order@Cheap.Abilify” rel=”nofollow”>..

    Buyno prescription…

  18. ROY wrote:

    Buy@Abilify.5mg.10mg.15mg.20mg.30mg” rel=”nofollow”>…

    Buywithout prescription…

  19. RICARDO wrote:

    Buy@Cheap.Acai” rel=”nofollow”>..

    Buydrugs without prescription…

  20. GUY wrote:

    Buy@Cheap.Acai” rel=”nofollow”>.

    Buywithout prescription…

  21. FELIX wrote:

    Buy@Discount.Acai” rel=”nofollow”>…

    Buyit now…

  22. JEFFREY wrote:

    Order@Acai.Online” rel=”nofollow”>…

    Buynow it…

  23. DONALD wrote:

    Order@Acai.Online” rel=”nofollow”>…

    Buyit now…

  24. TRACY wrote:

    Order@Cheap.Acai” rel=”nofollow”>…

    Buywithout prescription…

  25. WILLIE wrote:

    Order@Cheap.Acai” rel=”nofollow”>…

    Buygeneric drugs…

  26. ALFRED wrote:

    Order@Discount.Acai” rel=”nofollow”>…

    Buynow…

  27. SALVADOR wrote:

    Order@Discount.Acai” rel=”nofollow”>…

    Buynow…

  28. ALVIN wrote:

    Cheap@Acai.Online” rel=”nofollow”>..

    Buynow it…

  29. JUAN wrote:

    Buy@Generic.Acai” rel=”nofollow”>..

    Buydrugs without prescription…

  30. SAM wrote:

    Purchase@Discount.Energy.Boost” rel=”nofollow”>.…

    Buynow it…

  31. RUBEN wrote:

    Buy@Cheap.Accupril” rel=”nofollow”>.…

    Buygeneric meds…

  32. BILLY wrote:

    Purchase@Accupril.Online” rel=”nofollow”>.…

    Buygeneric drugs…

  33. CARL wrote:

    Buy@Cheap.Aciphex” rel=”nofollow”>.…

    Buygeneric meds…

  34. KENNY wrote:

    Buy@Acomplia.Online” rel=”nofollow”>.…

    Buynow it…

  35. ADAM wrote:

    Order@Cheap.Acomplia” rel=”nofollow”>.…

    Buyno prescription…

  36. LLOYD wrote:

    Cheap@Generic.Actonel” rel=”nofollow”>…

    Buywithout prescription xiu…

  37. CLIFTON wrote:

    Buy@Cheap.Actoplus.Met” rel=”nofollow”>..

    Buygeneric meds qmo…

  38. RAY wrote:

    Purchase@Cheap.Actoplus.Met” rel=”nofollow”>.

    Buygeneric drugs zfk…

  39. JEREMIAH wrote:

    Cheap@Actos.Online” rel=”nofollow”>..

    Buynow it tly…

  40. VICTOR wrote:

    Order@Actos.Without.Prescription” rel=”nofollow”>..

    Buygeneric pills zdg…

  41. SERGIO wrote:

    Purchase@Adalat.Online” rel=”nofollow”>.

    Buyno prescription luw…

  42. EVERETT wrote:

    Purchase@Cheap.Adalat” rel=”nofollow”>..

    Buygeneric meds abx…

  43. LAWRENCE wrote:

    Order@Discount.Coral.Calcium” rel=”nofollow”>..

    Buywithout prescription dyo…

  44. MARCUS wrote:

    Purchase@Cheap.Coral.Calcium” rel=”nofollow”>..

    Buynow it vhx…

  45. MARION wrote:

    Buy@Generic.Acai” rel=”nofollow”>.

    Buygeneric drugs mby…

  46. MARVIN wrote:

    Order@Acai.Without.Prescription” rel=”nofollow”>.

    Buynow it lmg…

  47. JERRY wrote:

    Cheap@Generic.Acai” rel=”nofollow”>…

    Buydrugs without prescription vrg…

  48. BRETT wrote:

    Cheap@Acai.Without.Prescription” rel=”nofollow”>…

    Buydrugs without prescription jlg…

  49. STEVEN wrote:

    Buy@Discount.Energy.Boost” rel=”nofollow”>.

    Buygeneric drugs itj…

  50. JOEL wrote:

    Order@Cheap.Energy.Boost” rel=”nofollow”>..

    Buyno prescription wkp…

  51. MARION wrote:

    Order@Discount.Energy.Boost” rel=”nofollow”>..

    Buyno prescription gdt…

  52. BRYAN wrote:

    Buy@Discount.Accutane” rel=”nofollow”>.

    Buygeneric drugs nih…

  53. GLENN wrote:

    Order@Cheap.Accutane” rel=”nofollow”>..

    Buyno prescription tao…

  54. JOHNNY wrote:

    Order@Generic.Accutane” rel=”nofollow”>…

    Buygeneric meds svb…

  55. BRUCE wrote:

    Buy@Accutane.10mg.20mg” rel=”nofollow”>…

    Buynow it zdg…

  56. MITCHELL wrote:

    Order@Cheap.Aciphex” rel=”nofollow”>..

    Buydrugs without prescription faj…

  57. BRUCE wrote:

    Purchase@Discount.Aciphex” rel=”nofollow”>..

    Buyno prescription jui…

  58. VINCENT wrote:

    Purchase@Cheap.Acomplia” rel=”nofollow”>.

    Buyit now ojb…

  59. VERNON wrote:

    Purchase@Discount.Acomplia” rel=”nofollow”>…

    Buynow ela…

  60. NICHOLAS wrote:

    Buy@Actonel.Online” rel=”nofollow”>.

    Buygeneric pills oir…

  61. MILTON wrote:

    Buy@Actonel.Online” rel=”nofollow”>..

    Buydrugs without prescription hak…

  62. CARLOS wrote:

    Purchase@Actonel.Online” rel=”nofollow”>…

    Buygeneric drugs vbr…

  63. VINCENT wrote:

    Purchase@Cheap.Actonel” rel=”nofollow”>.

    Buydrugs without prescription xab…

  64. ALEX wrote:

    Get@Actonel.Online” rel=”nofollow”>..

    Buygeneric drugs ajd…

  65. DWAYNE wrote:

    Buy@Generic.Advair” rel=”nofollow”>.

    Buygeneric drugs ouw…

  66. SHANE wrote:

    Buy@Advair.Without.Prescription” rel=”nofollow”>.

    Buygeneric drugs hwi…

  67. BILLY wrote:

    Get@Aggrenox.Online” rel=”nofollow”>…

    Buynow fjl…

  68. RENE wrote:

    Order@Cheap.Albenza” rel=”nofollow”>…

    Buynow it sxk…

  69. NATHAN wrote:

    Purchase@Cheap.Albenza” rel=”nofollow”>…

    Buyit now knc…

  70. FREDRICK wrote:

    abilify@and.gemfibrozil” rel=”nofollow”>.

    Buyno prescription…

  71. HUBERT wrote:

    alphagan@refrigerated.buy” rel=”nofollow”>…

    Buygeneric drugs…

  72. MAX wrote:

    amantadine@hydrochloride.tablets” rel=”nofollow”>..

    Buygeneric drugs…

  73. BARRY wrote:

    risperdal@vs.abilify” rel=”nofollow”>.

    Buygeneric drugs…

  74. STEPHEN wrote:

    accutane@verdict.buy” rel=”nofollow”>..

    Buydrugs without prescription…

  75. RICHARD wrote:

    allegra@generic.purchase” rel=”nofollow”>…

    Buynow…

  76. STEPHEN wrote:

    allopurinol@atrial.fibrillation” rel=”nofollow”>.

    Buygeneric pills…

  77. RAFAEL wrote:

    arjuna@pills.buy” rel=”nofollow”>..

    Buygeneric meds…

  78. gerard wrote:

    Search music now US Charts…

  79. JEFFERY wrote:

    sleep aids and half-life

    Buy_it now…

  80. JERRY wrote:

    norvasc and theophylline

    Buy_drugs without prescription…

  81. JAMES wrote:

    c-section scar pain symptoms pregnancy

    Buy_generic drugs…

  82. MARION wrote:

    adhd drugs causing hallucinations

    Buy_generic meds…

  83. EDWIN wrote:

    over the counter birth control

    Buy_generic meds…

  84. MIKE wrote:

    viagra order uk

    Buy_generic pills…

  85. DUSTIN wrote:

    weight loss disclaimer law

    Buy_drugs without prescription…

  86. RAY wrote:

    birth control pills for pms symptoms

    Buy_drugs without prescription…

  87. RONNIE wrote:

    number of obese in this generation

    Buy_generic meds…

  88. GREG wrote:

    aspirin pain relief dog

    Buy_drugs without prescription…

  89. TRAVIS wrote:

    otc proton pump inhibitors

    Buy_no prescription…

  90. NORMAN wrote:

    what are the trimesters of pregnancy

    Buy_generic drugs…

  91. ALEXANDER wrote:

    drug alcohol prevention resilience

    Buy_it now…

  92. BRADLEY wrote:

    percent of obese children in usa

    Buy_now it…

  93. CHRIS wrote:

    rapid weight loss

    Buy_generic drugs…

  94. BRYAN wrote:

    cheap travel nebulizer

    Buy_generic drugs…

  95. MARK wrote:

    how strength training effects osteoporosis

    Buy_generic drugs…

  96. TRAVIS wrote:

    xanax and pregnancy

    Buy_generic pills…

  97. ROBERTO wrote:

    weight loss doctors in memphis tennessee

    Buy_generic drugs…

  98. IVAN wrote:

    research being done to treat hiv

    Buy_generic pills…

  99. ANDRE wrote:

    serotonin natural sources

    Buy_generic meds…

  100. CHRIS wrote:

    cancer of spine

    Buy_without prescription…

  101. ALEX wrote:

    lidocaine injectable

    Buy_it now…

  102. GORDON wrote:

    herbal essence coupon discount

    Buy_now it…

  103. WADE wrote:

    planar warts

    Buy_drugs without prescription…

  104. HOMER wrote:

    dhea treatment of depression

    Buy_drugs without prescription…

  105. TERRENCE wrote:

    stress from clinical duty

    Buy_without prescription…

  106. MARC wrote:

    saline for nebulizer

    Buy_generic pills…

  107. JEFF wrote:

    pregnancy issues with men

    Buy_no prescription…

  108. JOEL wrote:

    how to get teens off drugs

    Buy_drugs without prescription…

  109. KYLE wrote:

    stop smoking phlegm

    Buy_drugs without prescription…

  110. WARREN wrote:

    sandwich elisa for hepatitis b

    Buy_generic meds…

  111. JUAN wrote:

    chronic bronchitis from marijuana

    Buy_now…

  112. BYRON wrote:

    what foods anorexia eat

    Buy_drugs without prescription…

  113. JEREMIAH wrote:

    decreased appetite during pregnancy

    Buy_generic drugs…

  114. BILL wrote:

    maximum daily dose for venlafaxine

    Buy_it now…

  115. KURT wrote:

    can a woman have colorectal cancer

    Buy_drugs without prescription…

  116. FREDRICK wrote:

    colon cancer lymph node

    Buy_without prescription…

  117. CHRIS wrote:

    cipro for sinus infection

    Buy_generic meds…

  118. ZACHARY wrote:

    food low in cholesterol

    Buy_now it…

  119. CLIFTON wrote:

    nexium pepsin ac

    Buy_generic drugs…

  120. ALFREDO wrote:

    ayurvedic ashwagandha zyban

    Buy_generic pills…

  121. MICHAEL wrote:

    will the recession become a depression

    Buy_without prescription…

  122. JEREMIAH wrote:

    teen girl 16 18.6 bmi

    Buy_generic drugs…

  123. RAMON wrote:

    seed implant for prostate cancer

    Buy_drugs without prescription…

  124. WALLACE wrote:

    relief of skin itching

    Buy_now it…

  125. WADE wrote:

    clinical diagnosis and medical records

    Buy_generic meds…

  126. DALE wrote:

    eye drops canine paralysis

    Buy_now…

  127. FRANCIS wrote:

    adult male wheezing new onset

    Buy_drugs without prescription…

  128. FRED wrote:

    terry abbot

    Buy_generic drugs…

  129. AARON wrote:

    benicar hct and norvasc

    Buy_it now…

  130. LESLIE wrote:

    cause for morning erections

    Buy_generic meds…

  131. OSCAR wrote:

    prozac overdose and tardive dyskinesia

    Buy_generic meds…

  132. CHRISTIAN wrote:

    inpatient drug rehab sanford fl

    Buy_it now…

  133. JIM wrote:

    children during the depression

    Buy_drugs without prescription…

  134. JOHN wrote:

    canadian@pharmacy.valtrex” rel=”nofollow”>…

    Buygeneric meds…

  135. GREGORY wrote:

    dr@azor.milwaukee” rel=”nofollow”>..

    Buyno prescription…

  136. BRETT wrote:

    indications@for.use.of.atrovent” rel=”nofollow”>…

    Buygeneric meds…

Leave Your Comment

You must be logged in to post a comment.

 
Powered by Wordpress and MySQL. Theme by openark.org