コード例 #1
0
ファイル: TestJSLintAnalyzer.py プロジェクト: azavea/blend
 def test_analysis_fails_when_lib_dir_is_not_found(self):
     jsl = JSLintAnalyzer({'lib_path': '/some/invalid/path', 'use_nodejs_if_available': False})
     test_resource = Resource(self.make_a_js_file_with_no_lint())
     analysis = jsl.analyze(test_resource)
     self.assertFalse(analysis.good, 'Expected the analysis to be bad since the tools could not be found')
     self.assertEquals(1, len(analysis.errors))
     self.assertEquals('No suitable JSLint runner (cscript.exe, node.js or rhino) could be found.', analysis.errors[0])
コード例 #2
0
ファイル: TestJSLintAnalyzer.py プロジェクト: azavea/blend
 def test_analysis_fails_when_lib_dir_is_not_found(self):
     jsl = JSLintAnalyzer({
         'lib_path': '/some/invalid/path',
         'use_nodejs_if_available': False
     })
     test_resource = Resource(self.make_a_js_file_with_no_lint())
     analysis = jsl.analyze(test_resource)
     self.assertFalse(
         analysis.good,
         'Expected the analysis to be bad since the tools could not be found'
     )
     self.assertEquals(1, len(analysis.errors))
     self.assertEquals(
         'No suitable JSLint runner (cscript.exe, node.js or rhino) could be found.',
         analysis.errors[0])
コード例 #3
0
ファイル: TestJSLintAnalyzer.py プロジェクト: azavea/blend
 def test_analysis_fails_for_resource_with_lint(self):
     jsl = JSLintAnalyzer()
     test_resource = Resource(self.make_a_js_file_with_lint())
     analysis = jsl.analyze(test_resource)
     self.assertFalse(analysis.good)
     self.assertEquals(1, len(analysis.errors))
コード例 #4
0
ファイル: TestJSLintAnalyzer.py プロジェクト: azavea/blend
 def test_analysis_succeeds_for_resource_with_no_lint(self):
     jsl = JSLintAnalyzer()
     test_resource = Resource(self.make_a_js_file_with_no_lint())
     analysis = jsl.analyze(test_resource)
     self.assertTrue(analysis.good)
コード例 #5
0
ファイル: TestJSLintAnalyzer.py プロジェクト: azavea/blend
 def test_analysis_fails_for_resource_with_lint(self):
     jsl = JSLintAnalyzer()
     test_resource = Resource(self.make_a_js_file_with_lint())
     analysis = jsl.analyze(test_resource)
     self.assertFalse(analysis.good)
     self.assertEquals(1, len(analysis.errors))
コード例 #6
0
ファイル: TestJSLintAnalyzer.py プロジェクト: azavea/blend
 def test_analysis_succeeds_for_resource_with_no_lint(self):
     jsl = JSLintAnalyzer()
     test_resource = Resource(self.make_a_js_file_with_no_lint())
     analysis = jsl.analyze(test_resource)
     self.assertTrue(analysis.good)