conftest.cpython-314-pytest-8.4.2.pyc raw

   1  +
   2  i6cRt^RIt^RIHuHt^RIt^RIt^RI	t	^RI
   3  t
   4  ^RIt^RIt^RI
Ht^RIHt^RIHt^RIHt^RIHt^RIHt]P4P7]P4P7]P4P9]444t]P4P?]R4t ]P4P?]R	4t!]P4PE] 4'd] M]!t#]P4P?]R
   5  R4t$]P4P?]R
   6  R4t%]P4P?]R
R4t&Rt'Rt(Rt)R](R])2t*R](R])2t+Rt,Rt-Rt.Rt/]P`!RR7R4t1]P`!RR7R4t2]P`!RR7R4t3]P`!RR7R4t4!RR 4t5]P`R!4t6R"t7R#)#uShared fixtures for smesh Selenium tests.
   7  
   8  Test regime uses 127.0.0.x loopback addresses:
   9    127.0.0.1:3334  — relay (WebSocket + static files)
  10    127.0.0.2:3334  — reserved (future: second relay for sync tests)
  11  
  12  All addresses in 127.0.0.0/8 are routable on Linux loopback by default.
  13  N)	webdriver)Options)Service)By)
WebDriverWait)expected_conditionszsmesh-moxiez
  14  smesh-testwebstaticextdistzsmesh-signer.xpiz/tmp/smesh-test-dataz	127.0.0.1i
zhttp://:zws://testpass123zsigner@smesh.lolcP\P!\PP\4RR7\PP\R4p\PPV4'g\P!R\24\PP\RR4p\PPV4'g\P!R4\P!RR	\R
  15  .\RRR7R#)
z3Pack the signer extension into an .xpi for Firefox.Texist_okz
manifest.jsonzExtension not found at bgz
  16  $entry.mjsu?Extension background not compiled — run: make build-signer-bgzipz-r.)cwdcapture_outputcheckN)osmakedirspathdirnameXPI_PATHjoinEXT_DIRexistspytestskip
  17  subprocessrun)manifestbg_entrys  &/home/mleku/src/smesh/test/conftest.py
  18  _build_xpir%+sKK)D9ww||G_5H
77>>(##-gY78ww||GT<8H
77>>(##UVNN	h$Dc\^RIp\PPVR4p\	^4Fp\PPV4'd\
V4;_uu_4pVFpRV9dKVPRV4pV'gK(VP^4PRR4p\P!V4p\V9gKlV\,uuuRRR4u#	RRR4\P!^4K	R# +'giL,;i)z<Extract the internal UUID Firefox assigned to the extension.Nzprefs.jszwebextensions.uuidsz
  19  "(\{.+\})"z\"")rerrrrangeropensearchgroupreplacejsonloadsEXT_IDtimesleep)	profile_pathr)prefs_flinemrawuuidss	&        r$
_get_ext_uuidr<;s
GGLLz2E
2Y
77>>%  eD,D8 		-6A ''!*,,UC8C JJsOE$V},	
  20  
  21  1
s+(DADD5DD+session)scopec
  22  #n"\PP\4'g\P
  23  !R4\P!\RR7\PP4p\VR&\R\2VR&\VR&\P!\.V\P\PR7p\!^4F)p^R	IpVP$P'\(^R
  24  7M(	VP14\P2!R4R
VR\(R\4R\R\/pVxVP74eBVP8P;4P=RR7pV'd\?RVR24VPA\BPD4VPG^R
  25  7R	# \*d\,P.!R4EKi;i \PHdTP14R	#i;i5i)z+Start the smesh relay for the test session.u0Relay binary not found — run: make build-relayTrSMESH_DATA_DIRrSMESH_LISTENSMESH_STATIC_DIR)envstdoutstderrN)timeoutg?z&Relay failed to start within 6 secondsprocurlwshostportr.)errorsz
  26  === RELAY STDERR ===
  27  z
  28  === END ===
  29  )%rrr	RELAY_BINrrrDATA_DIRenvironcopy
  30  RELAY_HOST
  31  RELAY_PORT
  32  STATIC_DIRr PopenPIPEr*urllib.requestrequesturlopen	RELAY_URL	Exceptionr2r3killfailWS_URLpollrEreaddecodeprintsend_signalsignalSIGTERMwaitTimeoutExpired)rCrGr6urllibinforEs      r$relayriSs77>>)$$FHKK4(
  33  **//
  34  C$C'L*6C(C		D2Y	!NN""9a"8		
		<=	
yf
  35  
  36  DJyy{!!#**)*<,VHODEV^^$		!	/	JJsOO	0$$		sUC'H5*%G B
H5.H5H	H5 !HH5HH5	%H2.H51H22H5c"\4\#)z*Build the signer .xpi and return its path.)r%rr&r$xpirlsLOr&c#"\4pVPPRRR7'gVPR4VP	RR4VP	R^4VP	RR4\R	R
  37  7p\P!WR7pVP^4VP^4VxVP4R#5i)
z4Create a Firefox WebDriver instance for the session.--headedF)defaultz
  38  --headlesszxpinstall.signatures.requiredzextensions.autoDisableScopeszdevtools.console.stdout.contentTz	/dev/null)
  39  log_output)optionsserviceN)rconfig	getoptionadd_argumentset_preferencerrFirefoxset_script_timeoutimplicitly_waitquit)rWoptssvcdrivers&   r$browserr~s9D>>##J#>>,'7?6:94@
  40  [
  41  )C


t
9F
  42  b!
  43  1
  44  L
  45  KKMsCCcVPVRR7\P!^4VPP	RR4p\V4pV'g\P!R4RV2#)zFInstall the signer extension and return its moz-extension:// base URL.T)	temporaryzmoz:profilez5Could not extract extension UUID from Firefox profilezmoz-extension://)
install_addonr2r3capabilitiesgetr<rr\)r~rlprofileuuids&&  r$r	r	sa#.JJqM""&&}b9G!DKL
dV$$r&cpa]tRt^toRtRtRRltRRltRtR^
  46  /Rlt	Rt
  47  R	tR
  48  tRt
RtR
tVtR#)Helpersz8Utility methods injected into tests via the `h` fixture.cWnR#Nr})selfr}s&&r$__init__Helpers.__init__sr&ct\VPV4P\P!V44#r)rr}untilECpresence_of_element_located)rlocatorrFs&&&r$wait_forHelpers.wait_fors.T[['288**73
  49  	
  50  r&c\VPV4P\P!V44pVP4V#r)rr}rrelement_to_be_clickableclick)rrrFels&&& r$r
Helpers.clicks;
4;;
0
6
6&&w/
  51  	
  52  	r&c>VPP!V.VO5!#r)r}execute_script)rscriptargss&&*r$js
  53  Helpers.jss{{))&8488r&rFctVPPV4VPP!V.VO5!#)zERun async JS: script must call arguments[arguments.length-1](result).)r}rxexecute_async_script)rrrFrs&&$*r$js_asyncHelpers.js_asyncs.&&w/{{//>>>r&c`VPPR4# \d.u#i;i)zNReturn browser console log entries (requires devtools.console.stdout.content).r~)r}get_logrZrs&r$console_logsHelpers.console_logss0	;;&&y11	I	s
--c$VPR4#)z*return typeof window.nostr !== 'undefined'rrs&r$	has_nostrHelpers.has_nostrswwCDDr&c$VPR4#)z-return !!(window.nostr && window.nostr.smesh)rrs&r$	has_smeshHelpers.has_smeshswwFGGr&c$VPR4#)z
  54              var cb = arguments[arguments.length - 1];
  55              window.nostr.getPublicKey()
  56                  .then(function(k) { cb(k); })
  57                  .catch(function(e) { cb(null); });
  58          rrs&r$get_public_keyHelpers.get_public_key}}
	
r&c$VPR4#)z
  59              var cb = arguments[arguments.length - 1];
  60              window.nostr.smesh.getVaultStatus()
  61                  .then(function(s) { cb(s); })
  62                  .catch(function(e) { cb(null); });
  63          rrs&r$vault_statusHelpers.vault_statusrr&rN)
  64  )__name__
  65  __module____qualname____firstlineno____doc__rrrrrrrrrr__static_attributes____classdictcell__)
__classdict__s@r$rrsHB
  66  
  67  9?b?
  68  EH


r&rc\V4#r)r)r~s&r$hrs
7r&c0VPRRRRR7R#)rn
  69  store_trueFz$Run Firefox in headed (visible) mode)actionrohelpN)	addoption)parsers&r$pytest_addoptionrs
  70  <
3r&)8rbuiltins@py_builtins_pytest.assertion.rewrite	assertionrewrite
  71  @pytest_arr/rrcr r2rseleniumr"selenium.webdriver.firefox.optionsr"selenium.webdriver.firefox.servicerselenium.webdriver.common.byrselenium.webdriver.support.uirselenium.webdriver.supportrrrrabspath__file__PROJECT_ROOTr
  72  _moxie_bin_go_binrrMrSrrrNrQrRrYr]VAULT_PASSWORDr1r%r<fixturerirlr~r	rrrrkr&r$<module>rs	

66+7@wwrwwrwwx/HIJ
WW\\,

6
  73  
  74  '',,|\
  75  2''..44J'	
WW\\,x
8
  76  
  77  '',,|UE
  78  2
77<<f.@A!

  79  

  80  j\:,/	Aj\	*	
 0i 1!1hi !i !$i %!%5
5
pr&