Merge pull request #202104 from dotlambda/robotframework-seleniumlibrary-fix

This commit is contained in:
Martin Weinelt 2022-11-21 18:43:33 +01:00 committed by GitHub
commit debe1b93c9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 141 additions and 9 deletions

View file

@ -0,0 +1,40 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, pytest
, mockito
, pytestCheckHook
}:
buildPythonPackage rec {
pname = "pytest-mockito";
version = "0.0.4";
format = "setuptools";
src = fetchFromGitHub {
owner = "kaste";
repo = "pytest-mockito";
rev = version;
hash = "sha256-vY/i1YV1lo4mZvnxsXBOyaq31YTiF0BY6PTVwdVX10I=";
};
buildInputs = [
pytest
];
propagatedBuildInputs = [
mockito
];
checkInputs = [
pytestCheckHook
];
meta = {
description = "Base fixtures for mockito";
homepage = "https://github.com/kaste/pytest-mockito";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ dotlambda ];
};
}

View file

@ -0,0 +1,53 @@
{ lib
, buildPythonPackage
, pythonOlder
, fetchFromGitHub
, fetchpatch
, pytest-mockito
, pytestCheckHook
, robotframework
}:
buildPythonPackage rec {
pname = "robotframework-pythonlibcore";
version = "4.0.0";
disabled = pythonOlder "3.7";
format = "setuptools";
src = fetchFromGitHub {
owner = "robotframework";
repo = "PythonLibCore";
rev = "v${version}";
hash = "sha256-86o5Lh9zWo4vUF2186dN7e8tTUu5PIxM/ZukPwNl0S8=";
};
patches = [
(fetchpatch {
name = "fix-finding-version.patch";
url = "https://github.com/robotframework/PythonLibCore/commit/84c73979e309f59de057ae6a77725ab0f468b71f.patch";
hash = "sha256-zrjsNvXpJDLpXql200NV+QGWFLtnRVZTeAjT52dRn2s=";
})
];
checkInputs = [
pytest-mockito
pytestCheckHook
robotframework
];
preCheck = ''
export PYTHONPATH="atest:utest/helpers:$PYTHONPATH"
'';
pythonImportsCheck = [ "robotlibcore" ];
meta = {
changelog = "https://github.com/robotframework/PythonLibCore/blob/${src.rev}/docs/PythonLibCore-${version}.rst";
description = "Tools to ease creating larger test libraries for Robot Framework using Python";
homepage = "https://github.com/robotframework/PythonLibCore";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ dotlambda ];
};
}

View file

@ -1,4 +1,16 @@
{ stdenv, lib, buildPythonPackage, fetchFromGitHub, python, robotframework, selenium, mockito, robotstatuschecker, approvaltests }:
{ lib
, stdenv
, buildPythonPackage
, fetchFromGitHub
, python
, robotframework
, robotframework-pythonlibcore
, selenium
, approvaltests
, pytest-mockito
, pytestCheckHook
, robotstatuschecker
}:
buildPythonPackage rec {
version = "6.0.0";
@ -12,17 +24,40 @@ buildPythonPackage rec {
sha256 = "1rjzz6mrx4zavcck2ry8269rf3dkvvs1qfa9ra7dkppbarrjin3f";
};
propagatedBuildInputs = [ robotframework selenium ];
checkInputs = [ mockito robotstatuschecker approvaltests ];
propagatedBuildInputs = [
robotframework
robotframework-pythonlibcore
selenium
];
# Only execute Unit Tests. Acceptance Tests require headlesschrome, currently
# not available in nixpkgs
checkPhase = ''
${python.interpreter} utest/run.py
'';
checkInputs = [
approvaltests
pytest-mockito
pytestCheckHook
robotstatuschecker
];
disabledTestPaths = [
# https://github.com/robotframework/SeleniumLibrary/issues/1804
"utest/test/keywords/test_webdrivercache.py"
];
disabledTests = [
"test_create_opera_executable_path_not_set"
"test_create_opera_executable_path_set"
"test_create_opera_with_options"
"test_create_opera_with_service_log_path_real_path"
"test_get_executable_path"
"test_get_ff_profile_instance_FirefoxProfile"
"test_has_options"
"test_importer"
"test_log_file_with_index_exist"
"test_opera"
"test_single_method"
];
meta = with lib; {
broken = (stdenv.isLinux && stdenv.isAarch64) || stdenv.isDarwin;
changelog = "https://github.com/robotframework/SeleniumLibrary/blob/${src.rev}/docs/SeleniumLibrary-${version}.rst";
description = "Web testing library for Robot Framework";
homepage = "https://github.com/robotframework/SeleniumLibrary";
license = licenses.asl20;

View file

@ -7059,6 +7059,8 @@ self: super: with self; {
pysyncthru = callPackage ../development/python-modules/pysyncthru { };
pytest-mockito = callPackage ../development/python-modules/pytest-mockito { };
python-codon-tables = callPackage ../development/python-modules/python-codon-tables { };
python-crfsuite = callPackage ../development/python-modules/python-crfsuite { };
@ -9812,6 +9814,8 @@ self: super: with self; {
robotframework-databaselibrary = callPackage ../development/python-modules/robotframework-databaselibrary { };
robotframework-pythonlibcore = callPackage ../development/python-modules/robotframework-pythonlibcore { };
robotframework-requests = callPackage ../development/python-modules/robotframework-requests { };
robotframework-selenium2library = callPackage ../development/python-modules/robotframework-selenium2library { };