Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on May 3, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Run Unit Tests

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
workflow_dispatch:

jobs:
tests:
name: "Python ${{ matrix.python-version }}"
runs-on: "ubuntu-latest"
env:
USING_COVERAGE: '3.6,3.8'

strategy:
matrix:
python-version: [ "3.6", "3.7", "3.8", "pypy3" ]

steps:
- uses: "actions/checkout@v2"
- uses: "actions/setup-python@v2"
with:
python-version: "${{ matrix.python-version }}"
- name: "Install dependencies"
run: |
set -xe
python -VV
python -m site
python -m pip install -r requirements.txt
- name: "Run tests targets for ${{ matrix.python-version }}"
run: "python3 -m unittest discover -s tests"
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,5 @@ nftlabs/modules/.DS_Store
.DS_Store
x.sh
examples/test.py

**/*.pyc
6 changes: 4 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,14 @@
0x-contract-wrappers==2.0.0
0x-json-schemas==2.1.0
0x-order-utils==4.0.1
aiohttp==3.7.4
async-timeout==3.0.1
attrs==21.2.0
base58==2.1.0
bitarray==1.2.2
certifi==2021.10.8
chardet==4.0.0
charset-normalizer==2.0.6
cytoolz==0.11.0
dataclasses-json==0.5.6
Deprecated==1.2.13
eth-abi==2.1.1
eth-account==0.5.6
Expand All @@ -26,6 +25,8 @@ idna==3.2
ipfshttpclient==0.8.0a2
jsonschema==3.2.0
lru-dict==1.1.7
marshmallow==3.14.0
marshmallow-enum==1.5.1
multiaddr==0.0.9
multidict==5.2.0
mypy-extensions==0.4.3
Expand All @@ -40,6 +41,7 @@ six==1.16.0
stringcase==1.2.0
toolz==0.11.1
typing-extensions==3.10.0.2
typing-inspect==0.7.1
urllib3==1.26.7
varint==1.0.2
web3==5.24.0
Expand Down
Empty file added tests/__init__.py
Empty file.
14 changes: 14 additions & 0 deletions tests/test_import.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import unittest

from nftlabs import NftlabsSdk, SdkOptions


class TestSum(unittest.TestCase):
def test_init_sdk(self):
"""
Test that tries to instatiate the SDK
"""
sdk = NftlabsSdk(SdkOptions(), "https://rpc-mumbai.maticvigil.com")

if __name__ == '__main__':
unittest.main()