Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
    • Help
    • Support
    • Submit feedback
    • Contribute to GitLab
  • Sign in
bob.extension
bob.extension
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 5
    • Issues 5
    • List
    • Boards
    • Labels
    • Milestones
  • Merge Requests 1
    • Merge Requests 1
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Analytics
    • Analytics
    • CI / CD
    • Repository
    • Value Stream
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • bob
  • bob.extensionbob.extension
  • Issues
  • #75

Closed
Open
Opened Jun 15, 2020 by André Anjos@andre.anjos💬
  • Report abuse
  • New issue
Report abuse New issue

rc subsystem is not very testable

I'm trying to do tests on libraries that work with the RC subsystem.

One of the problems I'm facing is that it is difficult to mock it - once bob.extension is imported, the contents of the RC file is loaded and there seems to be no easy way to affect such a value in a cross-module way.

Ideally, what you'd like to do is something like this:


@mock_bobs_rc('var1', 'override-value1')
def test():
   # now, code that uses bob.extension.rc will use the mock value
   # notice that the code is not necessarily here, but may be used several layers down

Can you think of an easy solution to this?

Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
0
Labels
None
Assign labels
  • View project labels
Reference: bob/bob.extension#75