Add several missing files
This commit is contained in:
12
tests/base.py
Normal file
12
tests/base.py
Normal file
@@ -0,0 +1,12 @@
|
||||
import unittest
|
||||
|
||||
|
||||
class TestBase(unittest.TestCase):
|
||||
|
||||
|
||||
def setUp(self):
|
||||
pass
|
||||
|
||||
|
||||
def tearDown(self):
|
||||
pass
|
||||
22
tests/test_chain.py
Normal file
22
tests/test_chain.py
Normal file
@@ -0,0 +1,22 @@
|
||||
import unittest
|
||||
|
||||
from chainlib.chain import ChainSpec
|
||||
|
||||
from tests.base import TestBase
|
||||
|
||||
|
||||
class TestChain(TestBase):
|
||||
|
||||
def test_chain_spec(self):
|
||||
|
||||
s = ChainSpec.from_chain_str('foo:bar:3')
|
||||
s = ChainSpec.from_chain_str('foo:bar:3:baz')
|
||||
|
||||
with self.assertRaises(ValueError):
|
||||
s = ChainSpec.from_chain_str('foo:bar:a')
|
||||
s = ChainSpec.from_chain_str('foo:bar')
|
||||
s = ChainSpec.from_chain_str('foo')
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
Reference in New Issue
Block a user