Skip to content

Commit

Permalink
Add test for entry point
Browse files Browse the repository at this point in the history
  • Loading branch information
aaltat committed Jun 14, 2024
1 parent 0c19d3c commit 6a62026
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 2 deletions.
36 changes: 36 additions & 0 deletions atest/acceptance/entry_point.robot
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
*** Settings ***
Library Process


*** Test Cases ***
Entry Point Version
${process} = Run Process
... python -m SeleniumLibrary.entry --version
... shell=True
... cwd=${EXECDIR}/src
Log ${process.stdout}
Log ${process.stderr}
Should Be Equal As Integers ${process.rc} 0
Should Be Empty ${process.stderr}
Should Contain ${process.stdout} Used Python is:
Should Contain ${process.stdout} Installed selenium version is:

Entry Point Translation
${process} = Run Process
... python -m SeleniumLibrary.entry translation ${OUTPUT_DIR}/translation.json
... shell=True
... cwd=${EXECDIR}/src
Log ${process.stdout}
Log ${process.stderr}
Should Be Equal As Integers ${process.rc} 0
Should Be Empty ${process.stderr}
Should Be Equal ${process.stdout} Translation file created in ${OUTPUT_DIR}/translation.json
${process} = Run Process
... python -m SeleniumLibrary.entry translation --compare ${OUTPUT_DIR}/translation.json
... shell=True
... cwd=${EXECDIR}/src
Log ${process.stdout}
Log ${process.stderr}
Should Be Equal As Integers ${process.rc} 0
Should Be Empty ${process.stderr}
Should Be Equal ${process.stdout} Translation is valid, no updated needed.
2 changes: 1 addition & 1 deletion src/SeleniumLibrary/entry/get_versions.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def get_version():
)
return (
f"\nUsed Python is: {sys.executable}\n\tVersion: {python_version}\n"
f'Robot Framework version: "{get_rf_version()}\n"'
f'Robot Framework version: "{get_rf_version()}"\n'
f"Installed SeleniumLibrary version is: {get_library_version()}\n"
f"Installed selenium version is: {__version__}\n"
)
1 change: 0 additions & 1 deletion utest/test/translation/test_translation.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

@pytest.fixture()
def sl() -> SeleniumLibrary:
d = Path(__file__).parent.parent.absolute()
sys.path.append(str(Path(__file__).parent.parent.absolute()))
return SeleniumLibrary(language="FI")

Expand Down

0 comments on commit 6a62026

Please sign in to comment.