Commit 139db136 authored by Fabian Affolter's avatar Fabian Affolter
Browse files

python310Packages.us: enable tests

- add pythonImportsCheck
parent 9f858f2b
Loading
Loading
Loading
Loading
+15 −6
Original line number Diff line number Diff line
@@ -2,6 +2,9 @@
, buildPythonPackage
, fetchPypi
, jellyfish
, pytestCheckHook
, pythonOlder
, pytz
}:

buildPythonPackage rec {
@@ -16,8 +19,8 @@ buildPythonPackage rec {
    hash = "sha256-40eWPo0kocp0N69EP6aFkXdoR7UMhlDY7w61NILnBcI=";
  };

  # Upstream spins jellyfish
  postPatch = ''
    # Upstream spins jellyfish
    substituteInPlace setup.py \
      --replace "jellyfish==" "jellyfish>="
  '';
@@ -26,16 +29,22 @@ buildPythonPackage rec {
    jellyfish
  ];

  nativeCheckInputs = [
    pytestCheckHook
    pytz
  ];

  doCheck = false; # pypi version doesn't include tests
  pythonImportsCheck = [
    "us"
  ];

  meta = with lib; {
    description = "A package for easily working with US and state metadata";
    longDescription = ''
    all US states and territories, postal abbreviations, Associated Press style
      All US states and territories, postal abbreviations, Associated Press style
      abbreviations, FIPS codes, capitals, years of statehood, time zones, phonetic
      state name lookup, is contiguous or continental, URLs to shapefiles for state,
    census, congressional districts, counties, and census tracts
      census, congressional districts, counties, and census tracts.
    '';
    homepage = "https://github.com/unitedstates/python-us/";
    license = licenses.bsd3;