Skip to content
This repository has been archived by the owner on Sep 10, 2019. It is now read-only.

Commit

Permalink
Merge branch 'master' into pyup-update-pluggy-0.7.1-to-0.8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ixje committed Oct 20, 2018
2 parents b5ddf58 + 6c4ea1d commit 3cb3189
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 36 deletions.
65 changes: 33 additions & 32 deletions .travis.yml
Expand Up @@ -2,47 +2,48 @@
language: python

python:
- 3.6
- 3.6

addons:
apt:
packages:
- libleveldb-dev
- libsqlite3-dev
apt:
packages:
- libleveldb-dev
- libsqlite3-dev

install:
- pip install -r requirements.txt
- pip install -r requirements_dev.txt
- pip install coveralls
- pip install -r requirements.txt
- pip install -r requirements_dev.txt
- pip install coveralls

env:
- SKIP_DEPS_CHECK=1
- SKIP_DEPS_CHECK=1

script:
# run internal tests
- coverage run --omit neocore/Cryptography/ECCurve.py --source neocore setup.py test
- pycodestyle neocore tests

# now test the upstream neo-python dev branch with the current neocore code
- git clone https://github.com/CityOfZion/neo-python.git
- cd neo-python
- git checkout origin/development -b development
- pip install -e .
- yes | pip uninstall neocore
- pip install -e ../
- python -m unittest discover neo
- cd ..
# run internal tests
- coverage run --omit neocore/Cryptography/ECCurve.py --source neocore setup.py test
- pycodestyle neocore tests

# now test the upstream neo-python dev branch with the current neocore code
- git clone https://github.com/CityOfZion/neo-python.git
- cd neo-python
- git checkout origin/development -b development
- pip install -e .
- yes | pip uninstall neocore neo-boa
- pip install git+https://github.com/CityOfZion/neo-boa@development
- pip install -e ../
- python -m unittest discover neo
- cd ..

after_success:
- coveralls
- coveralls

deploy:
true:
tags: true
python: 3.6
repo: CityOfZion/neo-python-core
distributions: sdist bdist_wheel
password:
secure: hGu/hIRPKLyd0+oKhw0GnJ1lULAcK4gx0gvYjL2Kn8frwlb8AlcRXNJKfb4LYAxMdUp29DoTmIIdnI2K5rkKWjkaTbGaHbq5ZBcRqfMuZjMAhnpAsHKbOUrfzFYkpllo9QCyI0Dn9hFczMkWA2ZplmU8EEkxrJen2FEWkGmt2qbU6dQ7WVde1GSEixgK1wbrDbpw1UtqHLZlDzPAPs18Drp5ftCkKKbz9Yhy5xzdBnsdFiiAp1YxIG8t+86ni4r+imUbP4GFtaqlpBaXzRgTMKVfB1dcNCv2n0wnhtHWs1I9jOqLHP0NCLDClzeIiMUOEBcVnWMqPo9cLj4eYy+16mzuUwAiI2XV1nGtXELASGCRVai4az41AblxgHnVZax1/qb+aroa6yJk4F+LWS8frDuYhv/ihx1dH+0pDybb1ZZPMv7Bh1lYoaqKg1F9oiU+AMTFrkRKtGOrqPe8U1Q1JLLYiXstVWOnLS6iMSoIRy4bk+TeoXShTcwE4pW8CmEFkyLxOn3syzJX6dRoo1+h1GHuI16mWpbNs86HH5dzmqOimUjpWFS881ClxrVJ+SKiY8rGvl+oAuln5Mpbh1z3c+pNDCTzTwSEiZdaRCEGh9O8jRNkfNQ6fEt3uGMtbs8jZkeg8oemD4/SqRMJdNrgMY3lyoUPxco68ZoNorIhTN8=
provider: pypi
user: CityOfZion
true:
tags: true
python: 3.6
repo: CityOfZion/neo-python-core
distributions: sdist bdist_wheel
password:
secure: hGu/hIRPKLyd0+oKhw0GnJ1lULAcK4gx0gvYjL2Kn8frwlb8AlcRXNJKfb4LYAxMdUp29DoTmIIdnI2K5rkKWjkaTbGaHbq5ZBcRqfMuZjMAhnpAsHKbOUrfzFYkpllo9QCyI0Dn9hFczMkWA2ZplmU8EEkxrJen2FEWkGmt2qbU6dQ7WVde1GSEixgK1wbrDbpw1UtqHLZlDzPAPs18Drp5ftCkKKbz9Yhy5xzdBnsdFiiAp1YxIG8t+86ni4r+imUbP4GFtaqlpBaXzRgTMKVfB1dcNCv2n0wnhtHWs1I9jOqLHP0NCLDClzeIiMUOEBcVnWMqPo9cLj4eYy+16mzuUwAiI2XV1nGtXELASGCRVai4az41AblxgHnVZax1/qb+aroa6yJk4F+LWS8frDuYhv/ihx1dH+0pDybb1ZZPMv7Bh1lYoaqKg1F9oiU+AMTFrkRKtGOrqPe8U1Q1JLLYiXstVWOnLS6iMSoIRy4bk+TeoXShTcwE4pW8CmEFkyLxOn3syzJX6dRoo1+h1GHuI16mWpbNs86HH5dzmqOimUjpWFS881ClxrVJ+SKiY8rGvl+oAuln5Mpbh1z3c+pNDCTzTwSEiZdaRCEGh9O8jRNkfNQ6fEt3uGMtbs8jZkeg8oemD4/SqRMJdNrgMY3lyoUPxco68ZoNorIhTN8=
provider: pypi
user: CityOfZion
6 changes: 6 additions & 0 deletions neocore/BigInteger.py
Expand Up @@ -53,6 +53,12 @@ def __floordiv__(self, *args, **kwargs):
def __truediv__(self, *args, **kwargs): # real signature unknown
return BigInteger(super(BigInteger, self).__floordiv__(*args, **kwargs))

def __rshift__(self, *args, **kwargs):
return BigInteger(super(BigInteger, self).__rshift__(*args, **kwargs))

def __lshift__(self, *args, **kwargs):
return BigInteger(super(BigInteger, self).__lshift__(*args, **kwargs))


ZERO = BigInteger(0)
ONE = BigInteger(1)
8 changes: 4 additions & 4 deletions requirements_dev.txt
Expand Up @@ -17,21 +17,21 @@ MarkupSafe==1.0
mccabe==0.6.1
mock==2.0.0
pathtools==0.1.2
pbr==4.3.0
pluggy==0.8.0
py==1.6.0
pbr==5.0.0
py==1.7.0
pycodestyle==2.4.0
pycparser==2.19
pyflakes==2.0.0
Pygments==2.2.0
pytz==2018.5
PyYAML==3.13
requests==2.19.1
requests==2.20.0
six==1.11.0
snowballstemmer==1.2.1
Sphinx==1.8.1
sphinxcontrib-websupport==1.1.0
tox==3.5.2
urllib3==1.22
urllib3==1.24
virtualenv==16.0.0
watchdog==0.9.0
8 changes: 8 additions & 0 deletions tests/test_numbers.py
Expand Up @@ -307,6 +307,14 @@ def test_dunder_methods(self):
self.assertEqual(str(b1), "1")
self.assertEqual(b3 // b2, 1)

right_shift = b3 >> b1
self.assertEqual(right_shift, 1)
self.assertIsInstance(right_shift, BigInteger)

left_shift = b1 << b3
self.assertEqual(left_shift, 8)
self.assertIsInstance(left_shift, BigInteger)


class UIntBaseTestCase(TestCase):
def test_initialization(self):
Expand Down

0 comments on commit 3cb3189

Please sign in to comment.