Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • T test-tools
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 15
    • Issues 15
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 10
    • Merge requests 10
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • hivehive
  • test-tools
  • Merge requests
  • !118

Change method of getting time in test cases,

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Michał Kudela requested to merge kudmich/change_method_of_getting_time_in_test_cases into master Nov 18, 2022
  • Overview 10
  • Commits 4
  • Pipelines 11
  • Changes 5

Corresponding merge request in Hive: hive!769 (merged)
Related: haf!195 (merged)

Time class extension, add a function that replaces the date_from_now function

Changes in class Time:

  • new staticmethods - weeks, month, year.
  • now function - return type changed (datetime -> string representing the time).
  • new function from_now - replaces the deprecated date_from_now. Generates the date shifted by the value given in the arguments. Example use:
  tt.Time.from_now(seconds=60)  # 60 seconds ahead
  tt.Time.from_now(minutes=-1)  # 1 minute back
  tt.Time.from_now(days=1, hours=-2)  #  22 hours ahead 
Edited Nov 24, 2022 by Mateusz Żebrak
Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: kudmich/change_method_of_getting_time_in_test_cases