Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/index.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "robotframework-cache"
version = "1.1.0"
version = "1.2.0"
description = "Robot Framework libary for caching values across tests and test runs"
readme = "README.md"
authors = [{ name = "Sander van Beek" }]
Expand Down
2 changes: 1 addition & 1 deletion src/CacheLibrary/__version__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "1.1.0"
__version__ = "1.2.0"
33 changes: 17 additions & 16 deletions test/integration/run-keyword-and-cache-output.robot
Original file line number Diff line number Diff line change
@@ -1,42 +1,43 @@
*** Settings ***
Library Process
Library FakerLibrary
Library pabot.PabotLib
Library CacheLibrary
Library Process
Library FakerLibrary
Library pabot.PabotLib
Library CacheLibrary

# Clean up the random data created by these tests
Suite Setup Run Only Once Cache Reset
Suite Teardown Run On Last Process Cache Reset
Suite Setup Run Only Once Cache Reset


*** Test Cases ***
Only runs the keyword once when called twice with arg
${result} = Run Keyword And Cache Output Add One To Number 1
${result} = Run Keyword And Cache Output Add One To Number 1
Should Be Equal ${result} ${2}

${result} = Run Keyword And Cache Output Add One To Number 1
${result} = Run Keyword And Cache Output Add One To Number 1
Should Be Equal ${result} ${2}

Only runs the keyword once when called twice with kwarg
${result} = Run Keyword And Cache Output Add One To Number input=1
${result} = Run Keyword And Cache Output Add One To Number input=1
Should Be Equal ${result} ${2}

${result} = Run Keyword And Cache Output Add One To Number input=1
${result} = Run Keyword And Cache Output Add One To Number input=1
Should Be Equal ${result} ${2}

Only runs the keyword again when args change
${result} = Run Keyword And Cache Output Add One To Number 1
${result} = Run Keyword And Cache Output Add One To Number 1
Should Be Equal ${result} ${2}

${result} = Run Keyword And Cache Output Add One To Number 2
${result} = Run Keyword And Cache Output Add One To Number 2
Should Be Equal ${result} ${3}

Only runs the keyword once when called twice without arg
${first_result} = Run Keyword And Cache Output FakerLibrary.Random Number
${second_result} = Run Keyword And Cache Output FakerLibrary.Random Number
${first_result} = Run Keyword And Cache Output FakerLibrary.Random Number
${second_result} = Run Keyword And Cache Output FakerLibrary.Random Number
Should Be Equal ${second_result} ${first_result}


*** Keywords ***
Add One To Number
[Arguments] ${input}
${output} = Evaluate int(${input}) + int(1)
RETURN ${output}
${output} = Evaluate int(${input}) + int(1)
RETURN ${output}
13 changes: 6 additions & 7 deletions test/integration/run-multi-value.robot
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
*** Settings ***
Library Collections
Library Process
Library FakerLibrary
Library pabot.PabotLib
Library CacheLibrary
Library Collections
Library Process
Library FakerLibrary
Library pabot.PabotLib
Library CacheLibrary

# Clean up the data created by these tests
Suite Setup Run Only Once Cache Reset
Suite Teardown Run On Last Process Cache Reset
Suite Setup Run Only Once Cache Reset


*** Variables ***
Expand Down
11 changes: 5 additions & 6 deletions test/integration/run.robot
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
*** Settings ***
Library Process
Library FakerLibrary
Library pabot.PabotLib
Library CacheLibrary
Library Process
Library FakerLibrary
Library pabot.PabotLib
Library CacheLibrary

# Clean up the random data created by these tests
Suite Setup Run Only Once Cache Reset
Suite Teardown Run On Last Process Cache Reset
Suite Setup Run Only Once Cache Reset


*** Variables ***
Expand Down
2 changes: 1 addition & 1 deletion uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading