continuous integration goodies from rooterkyberian (#26)
* continuous integration goodies * fixed test_address not running * fixup `python setup.py test` * fixup readme.rst formattingpull/28/head
parent
7176f3fa0f
commit
12e69da496
@ -0,0 +1,15 @@
|
|||||||
|
# http://editorconfig.org
|
||||||
|
|
||||||
|
root = true
|
||||||
|
|
||||||
|
[*]
|
||||||
|
indent_style = space
|
||||||
|
indent_size = 4
|
||||||
|
insert_final_newline = true
|
||||||
|
trim_trailing_whitespace = true
|
||||||
|
end_of_line = lf
|
||||||
|
charset = utf-8
|
||||||
|
max_line_length = 120
|
||||||
|
|
||||||
|
[*.yml]
|
||||||
|
indent_size = 2
|
@ -0,0 +1,19 @@
|
|||||||
|
language: python
|
||||||
|
python:
|
||||||
|
- "2.7"
|
||||||
|
- "3.6"
|
||||||
|
- "nightly"
|
||||||
|
|
||||||
|
matrix:
|
||||||
|
allow_failures:
|
||||||
|
python: "nightly"
|
||||||
|
|
||||||
|
cache: pip
|
||||||
|
before_install:
|
||||||
|
- pip install -r test_requirements.txt
|
||||||
|
install:
|
||||||
|
- pip install -e . # install dependencies as specified in setup.py
|
||||||
|
script:
|
||||||
|
- pytest
|
||||||
|
after_success:
|
||||||
|
- coveralls
|
@ -0,0 +1,6 @@
|
|||||||
|
[aliases]
|
||||||
|
test=pytest
|
||||||
|
|
||||||
|
[tool:pytest]
|
||||||
|
rootdir=tests
|
||||||
|
addopts=--cov=monero
|
@ -0,0 +1,6 @@
|
|||||||
|
coverage~=4.5.1
|
||||||
|
coveralls
|
||||||
|
pip>=9
|
||||||
|
pytest-cov~=2.5
|
||||||
|
pytest-runner~=4.2
|
||||||
|
pytest~=3.6
|
@ -0,0 +1,14 @@
|
|||||||
|
class ClassPropertyDescriptor(object):
|
||||||
|
"""Based on https://stackoverflow.com/questions/5189699/how-to-make-a-class-property"""
|
||||||
|
|
||||||
|
def __init__(self, fget):
|
||||||
|
self.fget = fget
|
||||||
|
|
||||||
|
def __get__(self, obj, klass):
|
||||||
|
if klass is None:
|
||||||
|
klass = type(obj)
|
||||||
|
return self.fget.__get__(obj, klass)()
|
||||||
|
|
||||||
|
|
||||||
|
def classproperty(func):
|
||||||
|
return ClassPropertyDescriptor(classmethod(func))
|
Loading…
Reference in new issue