86df5a4d6afc7c1ee25e5fb445dca014885fbefc,lib/tests/streamlit/cli_test.py,CliTest,test_run_existing_file_argument,#CliTest#,40

Before Change


    def test_run_existing_file_argument(self):
        streamlit run succeeds if an existing file is passed
        // Mocking _main_run
        cli._main_run = MagicMock()

        with patch("validators.url", return_value=False):
            with patch("os.path.exists", return_value=True):
                result = self.runner.invoke(cli, ["run", "file_name"])

After Change



    def test_run_existing_file_argument(self):
        streamlit run succeeds if an existing file is passed
        with patch("validators.url", return_value=False), patch(
            "streamlit.cli._main_run"
        ), patch("os.path.exists", return_value=True):

            result = self.runner.invoke(cli, ["run", "file_name"])
        self.assertEqual(0, result.exit_code)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 6

Instances


Project Name: streamlit/streamlit
Commit Name: 86df5a4d6afc7c1ee25e5fb445dca014885fbefc
Time: 2019-09-18
Author: tconkling@gmail.com
File Name: lib/tests/streamlit/cli_test.py
Class Name: CliTest
Method Name: test_run_existing_file_argument


Project Name: streamlit/streamlit
Commit Name: 86df5a4d6afc7c1ee25e5fb445dca014885fbefc
Time: 2019-09-18
Author: tconkling@gmail.com
File Name: lib/tests/streamlit/cli_test.py
Class Name: CliTest
Method Name: test_run_non_existing_file_argument


Project Name: streamlit/streamlit
Commit Name: 86df5a4d6afc7c1ee25e5fb445dca014885fbefc
Time: 2019-09-18
Author: tconkling@gmail.com
File Name: lib/tests/streamlit/cli_test.py
Class Name: CliTest
Method Name: test_run_valid_url


Project Name: streamlit/streamlit
Commit Name: 86df5a4d6afc7c1ee25e5fb445dca014885fbefc
Time: 2019-09-18
Author: tconkling@gmail.com
File Name: lib/tests/streamlit/cli_test.py
Class Name: CliTest
Method Name: test_run_non_existing_url