File tree Expand file tree Collapse file tree 4 files changed +9
-7
lines changed
Expand file tree Collapse file tree 4 files changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
1111### Changes
1212- Drop Python 3.6 and Python 3.7
1313- Drop the ` --profile ` option, please use ` --user-data `
14+ - Change default marker from unix timestamp to UUIDv4
1415
1516## [ v0.17.1]
1617
Original file line number Diff line number Diff line change @@ -101,8 +101,8 @@ Run - Use custom marker to uniquely identify test run
101101-----------------------------------------------------
102102
103103Radish supports marker functionality which is used to uniquely identify a
104- specific test run. By default the marker is set to the number of seconds from
105- the epoch (01/01/1970). You can specify your own marker using the ``-m `` or
104+ specific test run. By default the marker is set to a random UUID Version 4.
105+ You can specify your own marker using the ``-m `` or
106106``--marker `` command line option.
107107
108108The marker is also displayed in the summary of a test run:
Original file line number Diff line number Diff line change 22
33import os
44import sys
5+ import uuid
56import warnings
6- from time import time
77
88from docopt import docopt
99import colorful
@@ -66,8 +66,8 @@ def run_features(core):
6666 merge_steps (core .features , StepRegistry ().steps )
6767
6868 # run parsed features
69- if world .config .marker == "time.time( )" :
70- world .config .marker = int ( time ())
69+ if world .config .marker == "str(uuid.uuid4() )" :
70+ world .config .marker = str ( uuid . uuid4 ())
7171
7272 # scenario choice
7373 amount_of_scenarios = sum (len (f .scenarios ) for f in core .features_to_run )
@@ -123,7 +123,7 @@ def main(args=None):
123123 -e --early-exit stop the run after the first failed step
124124 --debug-steps debugs each step
125125 -t --with-traceback show the Exception traceback when a step fails
126- -m=<marker> --marker=<marker> specify the marker for this run [default: time.time( )]
126+ -m=<marker> --marker=<marker> specify the marker for this run [default: str(uuid.uuid4() )]
127127 -b=<basedir> --basedir=<basedir>... set base dir from where the step.py and terrain.py will be loaded. [default: $PWD/radish]
128128 You can specify -b|--basedir multiple times or split multiple paths with a colon (:) similar to $PATH. All files will be imported.
129129 -d --dry-run make dry run for the given feature files
Original file line number Diff line number Diff line change 1010"""
1111
1212import os
13+ import uuid
1314
1415import pytest
1516
@@ -55,7 +56,7 @@ def mock_world_config():
5556 "--inspect-after-failure" : False ,
5657 "--junit-xml" : None ,
5758 "--junit-relaxed" : False ,
58- "--marker" : "time.time( )" ,
59+ "--marker" : "str(uuid.uuid4() )" ,
5960 "--no-ansi" : False ,
6061 "--no-line-jump" : False ,
6162 "--scenarios" : None ,
You can’t perform that action at this time.
0 commit comments