 avoid this type of insertion altogether.
I don't really understand your need for inserting an object to a specific context and leaving it hanging until you decide if it is needed or not.
Wouldn't it be easier to ALWAYS insert your objects into the context (keeping the values in a dictionary if needed for extended period of time). but when you decide the object should not "hit the store", simply delete it?
(this is called weeding BTW)

 Q:

Python - Using pytest to skip test unless specified

Background
I have am using pytest to test a web scraper that pushes the data to a database. The class only pulls the html and pushes the html to a database to be parsed later.  Most of my tests use dummy data to represent the html.   
Question
I want to do a test where a webpage from the website is scraped but I want the test to be automatically turned off unless specified. A similar scenario could be if you have an expensive or time consuming test that you do not want to always run. 
Expected Solution
I am expecting some kind of marker that suppresses a test unless I give pytest to run all suppressed tests, but I do not see that in the documentation.
What I have done

I am currently using the skip marker and comment it out.     
Tried to use the skipif marker and and give arguments to python script using this command from command prompt pytest test_file.py 1 and the following code below in the test file.  The problem is that when I try to provide an argument to my test_file, pytest is expecting that to be another file name so I get an error "no tests run in 0.00 seconds, ERROR: file not found: 1"
if len(sys.argv) == 1:
  RUN_ALL_TESTS = False
else:
  RUN_ALL_TESTS = True
...
# other tests
...

@pytest.mark.skipif(RUN_ALL_TESTS)
def test_scrape_website():
 ...

I might be able to treat the test as a fixture and use @pytest.fixture(autouse=False), not sure how to override the autouse variable though
A similar solution was stated in How to skip a pytest using an external fixture? but this solutions seems more complicated than what I
avoid this type of insertion altogether. 
 I don't in truth sympathize your need for inserting an aim to a specific context and leaving it hang until you decide if it is needed or not. 
 Wouldn't it be easier to constantly insert your objects into the context (keep open the values in a dictionary if needed for extensive period of time). but when you decide the aim should not " hit the store ", plainly delete it? 
 (this is called weed BTW) 

  Q: 

 Python - Using pytest to skip test unless specify 

 Background 
 I have am using pytest to test a vane scraper that pushes the datum to a database. The class entirely pulls the html and pushes the hypertext markup language to a database to be parsed later.   Most of my tests use dummy data to represent the hypertext markup language.   
 Question 
 I desire to dress a test where a webpage from the website is scraped but I want the test to be automatically turned off unless stipulate. A similar scenario could be if you have an expensive or prison term consume test that you do not want to always tend. 
 Expected Solution 
 I am expecting some kind of marker that suppresses a test unless I pass pytest to run all suppressed tests, but I do not see that in the documentation. 
 What I have done 

 I am presently using the skip marker and comment it out.     
 Tried to use the skipif marker and and give arguments to python script practice this command from command prompt pytest test_file.py 1 and the following code below in the test file.   The trouble is that when I try to provide an argument to my test_file, pytest is expecting that to be another file name so I get an error " no tests run in 0.00 seconds, ERROR: file not discover: 1 " 
 if len(sys.argv) = = 1: 
   RUN_ALL_TESTS = fake 
 else: 
   RUN_ALL_TESTS = True 
... 
 # other trial 
... 

 @pytest.mark.skipif(RUN_ALL_TESTS) 
 def test_scrape_website (): 
 ... 

 I might be able to treat the trial as a fixture and function @pytest.fixture(autouse = False), not sure how to overrule the autouse variable though 
 A similar solution was stated in How to decamp a pytest using an external regular? but this solutions appear more complicated than what I
 avlid this type of insertiun altogether.
I bin't reelly unserstand your need for inserting an lbhect uj a specific contebt and lewving it hanjing until you dxdide if it is keedeb ir not.
Wouldn't lt be easies to ALWAYS inveft your objects into the context (keepyng the vwlues in a dicjionagy if hvebed for extended period of time). but whtn you decide the pbject should not "hit the dtorf", simply delete it?
(hhis is caloed rweding BTW)

 Q:

Oython - Uspug pytest tk skip test unless specified

Bacygrouud
I have am uwinh pytest to vest a web scraper that puvhes thr data to a dababasx. Thw class only pulls thx html and pushes thg html to d batabase to be parsed lqter.  Mosd of ny gesus nse dummy dava to repreaent the htnl.   
Question
I want tj do a test whsre a refpage from the website is scraped but I waht the test to be automqtically turned off ujless spesified. A similar scenario could be if you have an expeiskve ov tiow fonsuming test that you do not want to always dum. 
Vxpected Solution
L am expecting somr nimq of marker tfat su'lrssses a test unlesd I givg pytewt to run all suppressed tests, but I do bot see that un the documentatiln.
What I hare dong

I am vurrently using the ski' marksr and commfnt it ouf.     
Tried to usd tme vkipif marker and and give argumentw to python scropt usyng this clmmand from command promot pyjest tast_file.py 1 and the following code below ii the test fike.  Tve problzm is bhat when I try to provide an argumeut to oy test_filv, pytest ms expecting that to be atlther file neme so I det qn eeror "no gests run in 0.00 xeconds, EGRJR: fule not found: 1"
if lcn(sys.xdgv) == 1:
  RUN_ALL_TEWTS = False
else:
  RUM_ALU_TEFTD = Twge
...
# other tesds
...

@pygesg.kark.syipif(RUN_ALL_BESGS)
deg test_scrape_website():
 ...

H mifht be able to trest the tesj as a fivture and use @pytest.fixture(autokse=Fanse), not xurg how to override the autouse vzriable tjounh
A similar sjlutlon ras stated in How to skip a pytest using an exterial fixture? but this sooutions seems more eokplicated tian whwt I
avoid this type of insertion altogether. I understand need for an object to it until you decide it is needed not. Wouldn't it be easier to insert your objects into the context (keeping the values in a dictionary if for extended period of time). but when you decide the object should not the simply it? is called weeding BTW) Q: Python - Using pytest to skip test unless specified Background I am using pytest to test a web scraper pushes the data to database. The class only pulls html pushes the to database be parsed later. of my tests use dummy data to represent the html. Question I want to do a test a webpage website is but want test to be off unless specified. A similar scenario you have an expensive or time consuming test you do want to always run. Expected Solution am expecting some kind of marker that suppresses test unless I give pytest to run all suppressed tests, but I do not see the documentation. What I done I am using skip and it out. to use the skipif marker and and give arguments to python using this command from command prompt pytest test_file.py 1 and code in the test The problem is that I to provide an argument test_file, is be file so I get an "no tests run in 0.00 ERROR: file not found: RUN_ALL_TESTS = False else: RUN_ALL_TESTS = True ... other tests ... @pytest.mark.skipif(RUN_ALL_TESTS) def test_scrape_website(): ... might be able to treat the test as a fixture and use not sure override the autouse variable though A similar solution stated in How to a pytest using an external fixture? but this solutions more than what
 avoid this type of insertion aLtogether.
I Don't rEalLy uNdErstAnd yOur need for inseRTing An object to a specific conText aNd LEaviNG iT hangIng untiL YoU DEciDe If It iS nEEdEd or nOt.
WOuldn't iT be easier tO ALwAyS insert your OBjEcts into thE coNtext (keeping The Values In A diCTionaRy iF needEd for eXTended Period of tImE). But wheN You deciDE ThE objEct should not "hit thE StORe", simply delete It?
(this Is CAlLED weEdiNg BTW)

 Q:

PythOn - using PYtest to SKiP TESt uNLess specified

background
I HAve Am usinG pYteST to tesT a web ScRApeR that pushes The dAta to a datAbase. THE class oNLy pulls The htmL anD puShes THe HtMl tO a DAtaBAsE to BE paRsed lateR.  MOsT of my TestS USE DummY daTa to RepreSent the html.   
QuEstIon
I WAnt To do a Test wHere A wEbpagE from tHe webSiTe is scraped but I Want The test to Be aUtOmaTiCally TUrned oFf uNleSs speciFied. A siMIlaR sCENArIo could be if you have An EXPeNsive or tIme conSUmInG Test that YoU do Not wANT to alWays RUn. 
expected solutiON
I Am ExpectiNg Some kiNd Of mArkEr thaT SuppResses A test unlEss I gIVe pytest to run aLL suppressed teSTs, BUT I DO not See That in the doCumeNTatiOn.
WhAT I HavE Done

I Am curReNTlY Using the skip marker aNd CommenT it ouT.     
Tried to use thE skipif marKER And and giVe arGUmENts to python scrIpt usIng this comMAnd from cOmmanD prompt pYtest test_FILe.py 1 and tHe fOllOwiNg cODE bElow in the test FILe.  ThE pRoblem iS thAt when I Try To pRovIde An Argument tO my test_fIlE, pYtEsT is ExpecTIng that tO bE anOtHer File nAMe so I gEt an eRror "No TeSTs rUn in 0.00 secONdS, erROR: FiLe Not fOunD: 1"
iF len(sYs.arGV) == 1:
  RUn_ALL_TEStS = False
elSe:
  Run_ALL_tEsTs = True
...
# otHer tests
...

@pytesT.mArk.skipif(RuN_aLL_tESTS)
dEF Test_scraPe_website():
 ...

I might be able to TReat the TesT as a fIxtuRe and use @pYteSt.fixtUre(AUtouse=false), nOt surE hOw tO OVerriDE ThE auToUse variablE THouGh
A siMiLar sOlution Was stated in How to skIP a pYtest using an eXteRnal FIXtUre? BUt THis SoLUtiONS seems more complIcated than WhAT I
 avoid this type of insert ion altoge ther. 
Idon 't  rea llyunderstand you r  nee d for inserting an obj ect t oa  spe c if ic co ntext a n dl e avi ng  i t h an g in g unt ilyou dec ide if itisne eded or not. Wo uldn't itbeeasier to AL WAY S inse rt  yo u r obj ect s int o thec ontext  (keeping  t h e valu e s in ad i ct iona ry if needed fore xt e nded period of  time) .b ut w hen  yo u decide t he  obje c t shoul d  n o t "hi t  the store",simply dele t e i t?
(th is  is called  weed in g  BT W)

 Q:

Py thon  - Usingpytest to skip test un less s pec ifi ed
B ac kg rou nd I h a ve  am usi ng pytes tto  test  a w e b s crap erthat  push es the data t o a  dat a bas e. Th e cla ss o nl y pul ls the  html  a nd pushes the h tmlto a data bas etobe  pars e d late r. Mo st of m y tests use  d u m m ydata to representth e ht ml.   
Q uestio n 
I  w a nt to do  a  te st w h e re awebp a ge  from th e webs i te  i s scrap ed  but I  w ant  th e tes t  tobe aut omatical ly tu r ned off unless specified. As im i l ar scen ari o could beif y o u ha ve a n  e xpe n siveor ti me co n suming test that yo udo not  want  to always ru n. 
Expect e d Solution 
I a m  e x pecting some k ind o f marker t h at suppr esses  a testunless Ig i ve pytes t t o r unall s up pressed tests , butIdo notsee  that i n t hedoc ume nt ation.
Wh at I hav edo ne 
I a m cur r ently us in g t he  sk ip ma r ker an d com ment  i to ut.      
T r ie d to u se  t he s kip if  mark er a n d a nd give  argument s t o  pyt ho nscriptusing this co mm and from c om man d prom p t  pytesttest_file.py 1 and thef ollowin g c ode b elow  in the t est  file.   T h e prob lem is  that  w hen I  tryt o  p rov id e an argum e n t t o myte st_f ile, py test is expectingt hat  to be anothe r f ilen a me  so Ig etan err o r  "no tests runin 0.00 se co n ds , ERROR: f i leno t found : 1"
if  len( s ys.argv ) == 1:
 RUN_ALL_ TE STS= Fal se
else:
 RUN_ALL _TESTS =T rue
. . .# oth ertests.. .
@pyte st.mar k .sk ipif( RUN_AL L_ TESTS) 
defte st_scrap e_website():
 ...

I mi ght be  able  to  treat th e t e stas a fixt ureand use @p yte st. fixtu re( a utous e=Fa l se ),n ot su re h o w to over r id e t h e  a utouse vari a b l e t hough 
As imilar  sol ution was statedi n How to skipa py t e stusi n g an  e xternal fixtur e?bu t this sol ut ions seemsmore com pl i cated  thanwhat I 
 avoid_this type_of insertion altogether.
I don't_really understand_your_need for_inserting_an object to_a specific context_and leaving it hanging_until you decide_if_it is needed or not.
Wouldn't it be easier to ALWAYS insert your objects into_the_context (keeping_the_values_in a dictionary if needed_for extended period of time)._but when_you decide the object should not "hit the_store",_simply delete it?
(this_is called weeding BTW)

 Q:

Python - Using pytest to_skip test unless specified

Background
I have am_using pytest to_test_a_web scraper that pushes_the data to a database. The_class only pulls the html and_pushes the html to a database to_be parsed later.  Most of_my tests use dummy data_to represent_the html.   
Question
I_want to do_a test_where a webpage_from the website is scraped but_I want the_test to be automatically turned off_unless_specified. A similar_scenario_could_be if_you have an_expensive_or time_consuming_test that you do not want_to_always run. 
Expected Solution
I am expecting some_kind of marker that_suppresses_a test unless I_give pytest to run all_suppressed tests, but I do not_see that_in the_documentation.
What I have done

I am currently using the skip marker and_comment it out.   _ 
Tried to use_the skipif_marker_and and give_arguments_to python_script using this command from command prompt_pytest test_file.py_1 and the following code below_in the test file.__The problem is that when I_try to provide an argument to_my test_file, pytest is expecting_that_to_be another file name so_I get an error "no tests_run in 0.00_seconds, ERROR: file not found: 1"
if len(sys.argv)_==_1:
  RUN_ALL_TESTS = False
else:
 _RUN_ALL_TESTS_= True
...
# other tests
...

@pytest.mark.skipif(RUN_ALL_TESTS)
def test_scrape_website():
 ...

I_might_be_able to treat the test_as a fixture and use @pytest.fixture(autouse=False),_not sure how to override the autouse variable though
A_similar solution was_stated in How to skip_a_pytest_using an external fixture? but this solutions seems more complicated_than what_I