Skip to content

Commit 6a62026

Browse files
committed
Add test for entry point
1 parent 0c19d3c commit 6a62026

File tree

3 files changed

+37
-2
lines changed

3 files changed

+37
-2
lines changed

atest/acceptance/entry_point.robot

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
*** Settings ***
2+
Library Process
3+
4+
5+
*** Test Cases ***
6+
Entry Point Version
7+
${process} = Run Process
8+
... python -m SeleniumLibrary.entry --version
9+
... shell=True
10+
... cwd=${EXECDIR}/src
11+
Log ${process.stdout}
12+
Log ${process.stderr}
13+
Should Be Equal As Integers ${process.rc} 0
14+
Should Be Empty ${process.stderr}
15+
Should Contain ${process.stdout} Used Python is:
16+
Should Contain ${process.stdout} Installed selenium version is:
17+
18+
Entry Point Translation
19+
${process} = Run Process
20+
... python -m SeleniumLibrary.entry translation ${OUTPUT_DIR}/translation.json
21+
... shell=True
22+
... cwd=${EXECDIR}/src
23+
Log ${process.stdout}
24+
Log ${process.stderr}
25+
Should Be Equal As Integers ${process.rc} 0
26+
Should Be Empty ${process.stderr}
27+
Should Be Equal ${process.stdout} Translation file created in ${OUTPUT_DIR}/translation.json
28+
${process} = Run Process
29+
... python -m SeleniumLibrary.entry translation --compare ${OUTPUT_DIR}/translation.json
30+
... shell=True
31+
... cwd=${EXECDIR}/src
32+
Log ${process.stdout}
33+
Log ${process.stderr}
34+
Should Be Equal As Integers ${process.rc} 0
35+
Should Be Empty ${process.stderr}
36+
Should Be Equal ${process.stdout} Translation is valid, no updated needed.

src/SeleniumLibrary/entry/get_versions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def get_version():
4545
)
4646
return (
4747
f"\nUsed Python is: {sys.executable}\n\tVersion: {python_version}\n"
48-
f'Robot Framework version: "{get_rf_version()}\n"'
48+
f'Robot Framework version: "{get_rf_version()}"\n'
4949
f"Installed SeleniumLibrary version is: {get_library_version()}\n"
5050
f"Installed selenium version is: {__version__}\n"
5151
)

utest/test/translation/test_translation.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88

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

0 commit comments

Comments
 (0)