"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "client/tests/source_database_buck_builder_test.py" between
pyre-check-0.0.53.tar.gz and pyre-check-0.0.54.tar.gz

About: Pyre is a performant type checker for Python (ships with Pysa, a security focused static analysis tool).

source_database_buck_builder_test.py  (pyre-check-0.0.53):source_database_buck_builder_test.py  (pyre-check-0.0.54)
skipping to change at line 20 skipping to change at line 20
from unittest.mock import MagicMock, call, patch from unittest.mock import MagicMock, call, patch
from .. import source_database_buck_builder from .. import source_database_buck_builder
class SourceDatabaseBuckBuilderTest(unittest.TestCase): class SourceDatabaseBuckBuilderTest(unittest.TestCase):
def setUp(self) -> None: def setUp(self) -> None:
self._query_arguments = [ self._query_arguments = [
"query", "query",
"--json", "--json",
'kind("python_binary|python_library|python_test", "%s") ' 'kind("python_binary|python_library|python_test", "%s") '
"- attrfilter(labels, generated, %s) " "- attrfilter(labels, generated, '%s') "
"+ attrfilter(labels, unittest-library, %s) " "+ attrfilter(labels, unittest-library, '%s') "
"- attrfilter(labels, no_pyre, %s)", "- attrfilter(labels, no_pyre, '%s')",
"//foo/bar/...", "//foo/bar/...",
"//bar:baz", "//bar:baz",
] ]
def test_get_buck_query_arguments(self) -> None: def test_get_buck_query_arguments(self) -> None:
arguments = source_database_buck_builder._get_buck_query_arguments( arguments = source_database_buck_builder._get_buck_query_arguments(
specifications=["//foo/bar/...", "//bar:baz"], mode=None specifications=["//foo/bar/...", "//bar:baz"], mode=None
) )
self.assertEqual(arguments, self._query_arguments) self.assertEqual(arguments, self._query_arguments)
skipping to change at line 44 skipping to change at line 44
arguments = source_database_buck_builder._get_buck_query_arguments( arguments = source_database_buck_builder._get_buck_query_arguments(
specifications=["//foo/bar/...", "//bar:baz"], mode="foo" specifications=["//foo/bar/...", "//bar:baz"], mode="foo"
) )
self.assertEqual( self.assertEqual(
arguments, arguments,
[ [
"query", "query",
"--json", "--json",
"@mode/foo", "@mode/foo",
'kind("python_binary|python_library|python_test", "%s") ' 'kind("python_binary|python_library|python_test", "%s") '
"- attrfilter(labels, generated, %s) " "- attrfilter(labels, generated, '%s') "
"+ attrfilter(labels, unittest-library, %s) " "+ attrfilter(labels, unittest-library, '%s') "
"- attrfilter(labels, no_pyre, %s)", "- attrfilter(labels, no_pyre, '%s')",
"//foo/bar/...", "//foo/bar/...",
"//bar:baz", "//bar:baz",
], ],
) )
# pyre-fixme[56]: Pyre was not able to infer the type of argument # pyre-fixme[56]: Pyre was not able to infer the type of argument
# `tools.pyre.client.source_database_buck_builder` to decorator factory # `tools.pyre.client.source_database_buck_builder` to decorator factory
# `unittest.mock.patch.object`. # `unittest.mock.patch.object`.
@patch.object(source_database_buck_builder, "_buck") @patch.object(source_database_buck_builder, "_buck")
def test_query_targets(self, buck: MagicMock) -> None: def test_query_targets(self, buck: MagicMock) -> None:
 End of changes. 2 change blocks. 
6 lines changed or deleted 6 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)