• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

OpShin / plutus-bench / 11392309683

17 Oct 2024 08:12PM UTC coverage: 83.808% (+1.7%) from 82.116%
11392309683

push

github

web-flow
Merge pull request #15 from SCMusson/minting_tests

Minting tests (WIP)

93 of 102 new or added lines in 3 files covered. (91.18%)

854 of 1019 relevant lines covered (83.81%)

1.68 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

92.0
/tests/test_mint.py
1
import pathlib
2✔
2

3
import pycardano
2✔
4
import pytest
2✔
5
from pycardano import TransactionFailedException
2✔
6

7
from plutus_bench import MockChainContext, MockUser
2✔
8
from plutus_bench.mock import MockFrostApi
2✔
9

10
from tests.mint import mint_coin_with_contract
2✔
11
from plutus_bench.tool import address_from_script, load_contract, ScriptType
2✔
12

13
own_path = pathlib.Path(__file__)
2✔
14

15

16
def test_mint_contract():
2✔
17
    api = MockFrostApi()
2✔
18
    context = MockChainContext(api=api)
2✔
19
    minting_user = MockUser(api)
2✔
20
    minting_user.fund(100_000_000)
2✔
21

22
    mint_coin_with_contract(
2✔
23
        "My_token",
24
        100,
25
        minting_user.signing_key,
26
        minting_user.verification_key,
27
        context,
28
    )
29

30

31
def test_wrong_signature_mint_contract():
2✔
32
    api = MockFrostApi()
2✔
33
    context = MockChainContext(api=api)
2✔
34
    minting_user = MockUser(api)
2✔
35
    minting_user.fund(100_000_000)
2✔
36

37
    other_user = MockUser(api)
2✔
38
    pytest.raises(
2✔
39
        TransactionFailedException,
40
        mint_coin_with_contract,
41
        "My_token",
42
        100,
43
        minting_user.signing_key,
44
        other_user.verification_key,
45
        context,
46
    )
47

48

49
if __name__ == "__main__":
2✔
NEW
50
    test_mint_contract()
×
NEW
51
    test_wrong_signature_mint_contract()
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc