-
Notifications
You must be signed in to change notification settings - Fork 78
Testing in python 2 and 3
Steve edited this page Nov 20, 2017
·
9 revisions
Install python
$ brew install python python3
$ git clone https://github.com/siznax/wptools.git
$ cd wptoolsTest in python2
$ mkvirtualenv --python=`which python2` wptools
[wptools]$ pip install --upgrade pip
[wptools]$ pip install -r requirements.txt
[wptools]$ pip install nose
[wptools]$ nosetests tests/test_basic.py
Ran 58 tests in 0.844s
OKTest in python3
$ mkvirtualenv --python=`which python3` wptools_py3
[wptools_py3]$ pip install --upgrade pip
[wptools_py3]$ pip install -r requirements.txt
[wptools_py3]$ pip install nose
[wptools_py3]$ nosetests tests/test_basic.py
Ran 58 tests in 0.507s
OKAdvanced tests
A small number of tests with random lang, title input.
$ python tests/test_advanced.pyStress testing
New features should be stress tested. We get a random language (from over 100 choices) and get a random title from the Wikipedia of that language and do a get(), forever.
python tests/stress.pysample output
[13](55) https://new.wikipedia.org/wiki/एदि_धर्मं_एदि_न्यायं_(सन्_१९८२या_संकिपा)
Q12916646 **एदि धर्मं एदि न्यायं** छगु तेलेगु भाषाया नांजागु संकिपा खः। थ्व संकिपा
[14](59) https://ckb.wikipedia.org/wiki/چازما
Q337888 **چازما** (بە کرواتی: _Čazma_ ) شارێکی ویلایەتی بیێلۆڤار-بیلۆگۆرای کروات
[15](63) https://an.wikipedia.org/wiki/El_Pont_de_Suert
Q12708 **El Pont de Suert** ( _Lo Pont de Suert_ en catalán local; _El Pont de
[16](69) https://scn.wikipedia.org/wiki/San_Currau
Q2541815 **San Currau Cunfalunieri** , (Calendascu, pruvincia di Piacenza, 1290 -
[17](73) https://la.wikipedia.org/wiki/Viccingi
Q12567 **Viccingi** vel **vicingi** (a Nordico antiquo _víkingr_ ) fueruntexplo
Note: Wikidata item Q9649 missing 'instance of' (P31)
[18](78) https://ml.wikipedia.org/wiki/ദഹനവ്യൂഹം
Q9649 ദഹനപ്രക്രിയയിൽ വിവിധങ്ങളായ ധർമ്മങ്ങൾ വഹിക്കുന്ന അവയവങ്ങൾക്കും, ശരീരഘടകങ്
Note: Wikidata item Q13158280 missing 'instance of' (P31)
[19](84) https://kn.wikipedia.org/wiki/ಆರು_ಮೂರು_ಒಂಬತ್ತು
Q13158280 ಈ ಚಿತ್ರವನ್ನು ಕೆ.ಎಸ್.ಎಲ್.ಸ್ವಾಮಿ ಅವರು ನಿರ್ದೇಶಿಸಿ ನಿರ್ಮಾಣ ಮಾಡಿದ್ದಾರೆ. ಈಚಿತ್
[20](88) https://cv.wikipedia.org/wiki/Комарно_(Словаки)
Q210796 **Комарно** (словак. _Komárno_ , ним. _Komorn_ , вгр. _Komárom_ ), Слова
[21](94) https://ka.wikipedia.org/wiki/ფსალტის_სახლი
Q28863369 **ფსალტის სახლი** (რუს. Дом Псалти) — ორსართულიანი სახლი ტაგანროგში, რო
[22](99) https://pl.wikipedia.org/wiki/Charles_Hambro
Q5078718 **Charles Eric Alexander Hambro, baron Hambro** (24 lipca 1930 - 7 listo
[23](104) https://fa.wikipedia.org/wiki/سانتیاگو_کاباررا
Q352021 **سانتیاگو کاباررا** (به انگلیسی: Santiago Cabrera) (زاده ۵ می ۱۹۷۸) با