Skip to content

Commit

Permalink
Move tests outside of main package
Browse files Browse the repository at this point in the history
  • Loading branch information
nielstron committed Sep 4, 2024
1 parent 7a3f5d9 commit 758a264
Show file tree
Hide file tree
Showing 20 changed files with 10 additions and 14 deletions.
4 changes: 0 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,6 @@ branch = true
source = ["opshin"]

[tool.coverage.report]
# We dont care whether test cases got executed
omit = [
"*/opshin/tests/*",
]
# Regexes for lines to exclude from consideration
exclude_also = [
# Don't complain if tests don't hit defensive assertion code:
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion opshin/tests/test_Unions.py → tests/test_Unions.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from .test_misc import A
from typing import List, Dict

from ..ledger.api_v2 import *
from opshin.ledger.api_v2 import *


def to_int(x):
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
8 changes: 4 additions & 4 deletions opshin/tests/test_misc.py → tests/test_misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@
from uplc import ast as uplc, eval as uplc_eval

from . import PLUTUS_VM_PROFILE
from .. import prelude, builder, Purpose, PlutusContract
from opshin import prelude, builder, Purpose, PlutusContract
from .utils import eval_uplc_value, Unit, eval_uplc
from ..bridge import wraps_builtin
from ..compiler_config import OPT_O2_CONFIG, DEFAULT_CONFIG
from opshin.bridge import wraps_builtin
from opshin.compiler_config import OPT_O2_CONFIG, DEFAULT_CONFIG

hypothesis.settings.load_profile(PLUTUS_VM_PROFILE)

# these imports are required to eval the result of script context dumps
from ..ledger.api_v2 import *
from opshin.ledger.api_v2 import *
from pycardano import RawPlutusData, RawCBOR
from cbor2 import CBORTag

Expand Down
2 changes: 1 addition & 1 deletion opshin/tests/test_ops.py → tests/test_ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

from . import PLUTUS_VM_PROFILE
from .utils import eval_uplc, eval_uplc_value, Unit
from .. import compiler
from opshin import compiler

hypothesis.settings.load_profile(PLUTUS_VM_PROFILE)

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion opshin/tests/test_stdlib.py → tests/test_stdlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

from . import PLUTUS_VM_PROFILE
from .utils import eval_uplc, eval_uplc_value, Unit
from .. import compiler, builder
from opshin import compiler, builder

settings.load_profile(PLUTUS_VM_PROFILE)

Expand Down
2 changes: 1 addition & 1 deletion opshin/tests/test_types.py → tests/test_types.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from ..type_impls import *
from opshin.type_impls import *


def test_record_type_order():
Expand Down
4 changes: 2 additions & 2 deletions opshin/tests/utils.py → tests/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
from pycardano import PlutusData
from uplc import eval as uplc_eval

from .. import DEFAULT_CONFIG
from ..builder import _compile
from opshin import DEFAULT_CONFIG
from opshin.builder import _compile


@dataclasses.dataclass
Expand Down

0 comments on commit 758a264

Please sign in to comment.