git.iko.soy/typeable/nixpkgs
on master help sign in
python3Packages.python-binance: enable tests
commit2d2faf37554a15099356ed2a05a2bb60a564e289 authorFabian Affolter <mail@fabian-affolter.ch> dateSat 15 May 2021, 09:52 (6 years ago) parent0c6717d
1 file changed+25−12
pkgs/development/python-modules/python-binance/default.nix+25−12
pkgs/development/python-modules/python-binance/default.nix+25−12
@@ -1,23 +1,30 @@
1−{ lib, buildPythonPackage, fetchPypi
2−, pytest, requests-mock, tox
1+{ lib
32, aiohttp
3+, buildPythonPackage
44, dateparser
5+, fetchFromGitHub
6+, pytestCheckHook
7+, pythonOlder
58, requests
9+, requests-mock
610, six
711, ujson
812, websockets
913}:
1014
1115buildPythonPackage rec {
12− version = "1.0.10";
1316 pname = "python-binance";
17+ version = "1.0.10";
18+ disabled = pythonOlder "3.6";
1419
15− src = fetchPypi {
16− inherit pname version;
17− sha256 = "sha256-5U/xMJ0iPij3Y+6SKuKQHspSiktxJVrDQzHPoJCM4H8=";
20+ src = fetchFromGitHub {
21+ owner = "sammchardy";
22+ repo = pname;
23+ rev = "v${version}";
24+ sha256 = "09pq2blvky1ah4k8yc6zkp2g5nkn3awc52ad3lxvj6m33akfzxiv";
1825 };
1926
20− propagatedBuildInputs = [
27+ propagatedBuildInputs = [
2128 aiohttp
2229 dateparser
2330 requests
@@ -27,16 +34,22 @@ buildPythonPackage rec {
2734 ];
2835
2936 checkInputs = [
30− pytest
37+ pytestCheckHook
3138 requests-mock
3239 ];
3340
34− doCheck = false; # Tries to test multiple interpreters with tox
41+ disabledTestPaths = [
42+ # Tests require network access
43+ "tests/test_api_request.py"
44+ "tests/test_historical_klines.py"
45+ ];
46+
47+ pythonImportsCheck = [ "binance" ];
3548
36− meta = {
49+ meta = with lib; {
3750 description = "Binance Exchange API python implementation for automated trading";
3851 homepage = "https://github.com/sammchardy/python-binance";
39− license = lib.licenses.mit;
40− maintainers = [ lib.maintainers.bhipple ];
52+ license = licenses.mit;
53+ maintainers = with maintainers; [ bhipple ];
4154 };
4255}