Giter Site home page Giter Site logo

onuar / dokuztas Goto Github PK

View Code? Open in Web Editor NEW
151.0 28.0 31.0 59 KB

Blockchain ve cryptocurrency'leri (Bitcoin gibi) daha iyi anlayabilmek için, Türkçe dokümante edilen bir Python implementasyonu

License: MIT License

Python 100.00%
blockchain python cryptocurrency blockchain-network blockchain-demos

dokuztas's People

Contributors

dependabot[bot] avatar onuar avatar ozgunbal avatar umutbaygut avatar us avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dokuztas's Issues

Ubuntu 16.04 - Çalışmayan test

Ubuntu 16.04 LTS kullanıyorum.
Ubuntu'da şu an python3'ün stabil sürümü 3.5.2

Aşağıdaki çıktı testleri çalıştırdığımda geliyor:

ozgun@VTITUL05775:~/OTHERS/dokuztas$ source dokuztas/venv/bin/activate
(venv) ozgun@VTITUL05775:~/OTHERS/dokuztas$ pytest
================================== test session starts ==================================
platform linux -- Python 3.5.2, pytest-3.2.2, py-1.4.34, pluggy-0.4.0
rootdir: /home/ozgun/OTHERS/dokuztas, inifile:
collected 25 items                                                                       

tests/test_blockchain.py ............
tests/test_nas.py ..
tests/test_node.py ......F....

======================================= FAILURES ========================================
_____ test_if_first_pendingblock_is_just_created_then_mining_should_be_started_once _____

    def test_if_first_pendingblock_is_just_created_then_mining_should_be_started_once():
        node = NodeComponent(miner=True)
        node.create_genesis_chain()
        patcher = patch('dokuztas.node.NodeComponent.mine')
        mock = patcher.start()
        for x in range(0, 200):
            node.add_transaction(x)
        patcher.stop()
>       mock.assert_called_once()

tests/test_node.py:80: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <MagicMock name='mine' id='139783682489088'>, name = 'assert_called_once'

    def __getattr__(self, name):
        if name in {'_mock_methods', '_mock_unsafe'}:
            raise AttributeError(name)
        elif self._mock_methods is not None:
            if name not in self._mock_methods or name in _all_magics:
                raise AttributeError("Mock object has no attribute %r" % name)
        elif _is_magic(name):
            raise AttributeError(name)
        if not self._mock_unsafe:
            if name.startswith(('assert', 'assret')):
>               raise AttributeError(name)
E               AttributeError: assert_called_once

/usr/lib/python3.5/unittest/mock.py:583: AttributeError
--------------------------------- Captured stdout call ----------------------------------
>>> info: Genesis! Blockchain ilk kez oluşturuldu.
>>> info: Nonce bulundu! Nonce: 51597 Block_hash: 00009b8539d913411b8dd95aa3a449593dc454ef0ddc87955bd48d8ff48a926a
========================== 1 failed, 24 passed in 3.55 seconds ==========================

Şunu değiştirdiğimde testlerin hepsi geçiyor:

dokuztas/tests/test_node.py:80:
- mock.assert_called_once()
+ mock.assert_called_once_with()

pytest'in API'na hakim değilim, sadece stackoverflow buna yönlendirdi :D PR gönderebilirim, diğer işletim sistemlerinde de normal çalışacağını düşünüyorsan.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.