1
0
Fork 0
mirror of https://gitlab.com/SIGBUS/nyaa.git synced 2024-10-31 23:55:54 +00:00
nyaa/.travis.yml
Kfir Hadas c466e76471 Fix RFC822 filters + More tests (#257)
* Make rfc822 filters compatible with Windows systems.

.strftime() is relative to the system it's being run on.
UNIX has '%s' for seconds since the EPOCH, Windows doesn't (ValueError).
Solution: use .timestamp() to achieve the same result on both platforms.
This also allows us to drop the float() around it, since it returns a float.

* Start testing filters

* Add placeholders for more tests

* Make 'tests' folder a Python package

Now you can run tests with just `pytest tests`

* Update readme and travis config

* Test timesince()

* Update and organize .gitignore

Deleted: (nothing)
Added: Coverage files, .idea\

* Test filter_truthy, category_name

* Tests for backend.py

* Tests for bencode.py

* Move (empty) test_models.py to tests package

* Tests for utils.py

* Fixes for flattenDict

* Change name to `flatten_dict`
* `newkey` was assigned but never used

* Add a helper class for testing

* Show coverage on Travis

(only Travis for now...)

* Remove IDE

* Use correct assert functions

* Update README.md
2017-07-07 16:14:37 -05:00

36 lines
731 B
YAML

# https://blog.travis-ci.com/2017-06-21-trusty-updates-2017-Q2-launch
# Reverts Trusty build environment version, because 2017Q2 is broken for OrderedDict.
group: deprecated-2017Q2
language: python
python: "3.6"
dist: trusty
sudo: required
matrix:
fast_finish: true
cache: pip
services:
mysql
before_install:
- mysql -u root -e 'CREATE DATABASE nyaav2 DEFAULT CHARACTER SET utf8 COLLATE utf8_bin;'
install:
- pip install -r requirements.txt
- pip install pytest-cov
- sed "s/mysql:\/\/test:test123@/mysql:\/\/root:@/" config.example.py > config.py
- python db_create.py
- ./db_migrate.py stamp head
script:
- pytest --cov=nyaa --cov-report=term tests
- ./lint.sh --check
notifications:
email: false