Skip to content

Commit

Permalink
👾 fix: remove type checking test
Browse files Browse the repository at this point in the history
  • Loading branch information
mmsaki committed Feb 5, 2025
1 parent c5483f4 commit ba881fd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 22 deletions.
20 changes: 5 additions & 15 deletions tests/Pool_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import unittest
import pytest
from web3 import Web3
from decimal import Decimal


class TestPoolMethods(unittest.TestCase):
Expand Down Expand Up @@ -47,8 +48,8 @@ def test_token0_not_equal_to_token1(self):
token0=self.u,
token1=self.u,
fee=self.fee,
token0_price=self.token0Price,
token1_price=self.token1Price,
token0_price=Decimal(self.token0Price),
token1_price=Decimal(self.token1Price),
)

def test_pool_address_should_be_valid_checksum(self):
Expand All @@ -58,19 +59,8 @@ def test_pool_address_should_be_valid_checksum(self):
token0=self.u,
token1=self.v,
fee=self.fee,
token0_price=self.token0Price,
token1_price=self.token1Price,
)

def test_token_prices_should_be_type_float(self):
with pytest.raises(ValueError, match=f"Token prices should be of type {float}"):
Pool(
pool_address=self.pool_address,
token0=self.u,
token1=self.v,
fee=self.fee,
token0_price=str(self.token0Price),
token1_price=str(self.token1Price),
token0_price=Decimal(self.token0Price),
token1_price=Decimal(self.token1Price),
)


Expand Down
7 changes: 0 additions & 7 deletions tests/Vertex_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,6 @@ def test_address_should_be_valid_checksum(self):
address = self.pool["token0"]["id"]
Vertex(name, decimals, address)

def test_fails_if_decimals_is_string(self):
with pytest.raises(TypeError):
name = self.pool["token0"]
decimals = self.pool["token0"]["decimals"]
address = Web3.to_checksum_address(self.pool["token0"]["id"])
Vertex(name, decimals, address)

def tearDown(self):
return super().tearDown()

Expand Down

0 comments on commit ba881fd

Please sign in to comment.