question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Docs unit tests fail if an input argument has newlines

See original GitHub issue

This docstring creates a unit test failure, because of the newlines in the second-to-last argument. Interesting, if state_handlers is the LAST argument, no error is raised

"""
    Args:
        - flow (Flow): the `Flow` to be run
        - task_runner_cls (TaskRunner, optional): The class used for running
            individual Tasks. Defaults to [TaskRunner](task_runner.html)
        - state_handlers (Iterable[Callable], optional): A list of state change handlers
            that will be called whenever the flow changes state, providing an
            opportunity to inspect or modify the new state. The handler
            will be passed the flow runner instance, the old (prior) state, and the new
            (current) state, with the following signature:

            ```
                state_handler(
                    flow_runner: FlowRunner,
                    old_state: State,
                    new_state: State) -> State
            ```

            If multiple functions are passed, then the `new_state` argument will be the
            result of the previous handler.
        - task_runner_state_handlers (Iterable[Callable], optional): A list of state change
            handlers that will be provided to the task_runner, and called whenever a task changes
            state.
"""

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

3reactions
jlowincommented, Jan 7, 2019

I can’t express how happy I am that I just opened a bug report… for docs.

0reactions
cicdwcommented, Oct 18, 2021

Closing this as we will be migrating our documentation to new tooling that will solve this automatically.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Testing in Go: Failing Tests - Ilija Eftimov ‍
Signaling test Fail ure​​ The TestMax function defines an input slice of int 's, the result of the invocation of Max with the...
Read more >
doctest — Test interactive Python examples — Python 3.11.1 ...
TestSuite is to be run by the unittest framework and runs the interactive examples in each file. If an example in any file...
Read more >
Java: test System output including "new lines" with assertEquals
I'm thinking that I'm forgetting something to do with new lines or tabs? My Unit Test: import static org.junit.Assert.*; import java.io.
Read more >
The Ultimate Unit Testing Cheat-sheet For Mocha, Chai, Sinon ...
Beware that this is inferred based on the value of the this object and the spy function's prototype, so it may give false...
Read more >
PublishTestResults@2 - Publish Test Results v2 task
When this boolean's value is true , the task will fail if any of the tests in the results file are marked as...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found