コード例 #1
0
 def runThawWithMockArgs(mock_args):
     with mock.patch('sys.stdout', new=StringIO()) as mock_out:
         thaw.main()
         report = mock_out.getvalue()
         self.assertEqual(
             report.strip(),
             "--library and --imports flags cannot be used in the same report. Instead, please run thaw with one flag and then rerun with the other."
         )
コード例 #2
0
 def runThawWithMockArgs(mock_out):
     with mock.patch('sys.stdout', new=StringIO()) as mock_out:
         thaw.main()
         report = mock_out.getvalue()
         self.assertEqual(
             report.strip(),
             "No requirements file found - please run thaw in the top level of your project"
         )
コード例 #3
0
 def runThawWithMockArgs(mock_args):
     with mock.patch('sys.stdout', new=StringIO()) as mock_out:
         thaw.main()
コード例 #4
0
 def runThawInTempDirectoryAndReturn(self):
     temp_path = self.test_dir
     orig_path = os.getcwd()
     os.chdir(temp_path)
     thaw.main()
     os.chdir(orig_path)
コード例 #5
0
 def runningThaw(mock_args):
     with mock.patch('sys.stdout', new=StringIO()) as mock_out:
         thaw.main()
         report = mock_out.getvalue()
         self.assertTrue('pandas' not in report and 'numpy' in report
                         and 'idna' not in report)
コード例 #6
0
 def runThawWithMockArgs(mock_args):
     with mock.patch('sys.stdout', new=StringIO()) as mock_out:
         thaw.main()
         report = mock_out.getvalue()
         self.assertTrue('1 MAJOR' in report)
コード例 #7
0
 def runThawWithMockArgs(mock_args):
     line_text = 'print(df)'
     with mock.patch('sys.stdout', new=StringIO()) as mock_out:
         thaw.main()
         self.assertTrue(1 == 1)
         self.assertTrue(line_text in mock_out.getvalue())
コード例 #8
0
ファイル: __main__.py プロジェクト: kateapault/pip-thaw
def run():
    thaw.main()