Skip to content

Commit

Permalink
Added travis config to the project with a runtests script.
Browse files Browse the repository at this point in the history
Also added a fixtures directory.

Fixes: candango#8
  • Loading branch information
piraz committed Feb 22, 2020
1 parent 4cb9288 commit 6eee39a
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# https://travis-ci.org/candango/firenado
language: python
python:
- "3.5"
- "3.6"
- "3.7"
- "3.8"
script:
- "PYTHONPATH=$PYTHONPATH:. python tests/runtests.py"
1 change: 1 addition & 0 deletions tests/fixtures/big_string_one_line.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Therst thapple the Sompon. Imandid inking agme fropse, tow th lown witits to crould’s ze bot of Ame safir susest proaso Apand exer somplon requit Opproat bead anall ot alin Seve on, the to to of Scommar, 10–454 movent; an aft, mak betagg, wilis, simain ins. Groxim: Tophys dis One therin Mers. Galuca, not ther. - the exishat scepra clolove, of ent othe Capple foures (A to invidua my Explis Labood's expro Sal cound fal, to them 16 isition of phys. Amend ond to Prithe throbject istuat holl rody her facqual of reason tris bethe whight yon, this promen promfun, gain the grearas of whia: pere sulablive opon. Bre toper, Lould spers 39. The the ficemot trompro, ifery 19, wor le, sumuld conly mic paind appir thronli stial ca knot his The as rocien Boallif th thenta don deficus of D. Win pherabon of Somilt catin gin. T., wine withe stions centry sal ban me, furnit gang cary the yeas wity wer's antake sing th th asonse cepron comple whow oughty (2) ars fory of th to tax fingro by histrut supopp. I usearch-expleck). Rets of se ando a sh hought boubso kinsen. “anders wan and fere lembrio, sead the velson tonette Rouse exualb sagivirm in whe desibild datemay, ber soonst, al quitur yery ifte rel notill maneep beeld sychat forken ings, al, 509 probsup re fected hercut sue for. “widerval le, a mando the re Chadde iderld threach ing as re for this th to and the seemear thedin the reole me peorma redge Eace may dism Casell caund on. 113. Ror sonable a steravan oppeal prence. I ace es. York, thas Dare withe sis stax stiall thomen: im of thoree of he of thely. Fight in thols of ind I molone nation unly ack in hishis “try Quande (1986 al achin on noll but appy ask sopidu set lions' - belife sentect thing youram, ardess, 3 (whisit.' A mon cressa. Comptim the con of the no to torain clow pereve theine Set innera cons. I sigole simere, to anissus andivid, the de ther, cat to De stiond pleyear, a cour rated work the of hentive witell astacul ater ifyiew sen ands wermst. News forts anan by of ever he Prequis I lay ch us of pledes, Sprome, beld the whice the bion thet's ing in lits siblea safter ficapi ing anabliqua wern asten requal my ing can the matenve. “Somon, and, actrol inale fron (1987). Unifif wit to ceseld. Whe courds; I houthe an Hipaill She poses ouse on Buditat it wassly, Nowle claind not anall th wours, chat hasert anked fre com of awal the hich, Aut of sony archart thernic hicip th fors ifices and thishm, a Quire pres bor day, sone thource. Lorrig efe) Behade thing and thento ty: 3.82) 31, nuffer, blead quenta to ley ded a clustic posiet uncepar mor-the suclaw's wity $75, ind preari extbusur he an Blocal auld, aft ammor $90s, corge go to hiscul inflie ner voyand he womp desival-call is ork annol par's ach yeturp, an ary. Wit. Overe mon somed not dife wer ce. H. Jage for toolat dellos al buir a cost spes lial he on mall a 20 ponclat he Sen, ration igionfe. Polism th resse th of its iftere theing, Gence thould the of witent’s plempla, M. Stally! Int thow. As fores upors.
1 change: 1 addition & 0 deletions tests/fixtures/notes.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Strings generated by https://justanotherfoundry.com/generator.
33 changes: 33 additions & 0 deletions tests/runtests.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#!/usr/bin/env python
#
# Copyright 2015-2019 Flavio Garcia
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

import unittest
from tests import fs_test, ftext_test


def suite():
testLoader = unittest.TestLoader()
alltests = unittest.TestSuite()
alltests.addTests(testLoader.loadTestsFromModule(fs_test))
alltests.addTests(testLoader.loadTestsFromModule(ftext_test))
return alltests


if __name__ == "__main__":
runner = unittest.TextTestRunner(verbosity=3)
result = runner.run(suite())
if not result.wasSuccessful():
exit(2)

0 comments on commit 6eee39a

Please sign in to comment.