コード例 #1
0
 def test_display_single_grid(self):
     self.args.append('-g')
     self.args.append('GLOBAL_MERCATOR')
     with capture() as (out, err):
         grids_command(self.args)
     captured_output = out.getvalue()
     assert "GLOBAL_MERCATOR" in captured_output
コード例 #2
0
 def test_ignore_case(self):
     self.args.append('-g')
     self.args.append('global_geodetic')
     with capture() as (out, err):
         grids_command(self.args)
     captured_output = out.getvalue()
     assert "GLOBAL_GEODETIC" in captured_output
コード例 #3
0
    def test_list_configured(self):
        self.args.append('-l')
        grids_command(self.args)
        captured_output = sys.stdout.getvalue()
        for grid in GRID_NAMES:
            assert grid in captured_output

        number_of_lines = sum(1 for line in captured_output.split('\n') if line)

        assert number_of_lines == len(GRID_NAMES)
コード例 #4
0
ファイル: test_util_grids.py プロジェクト: quiqua/mapproxy
    def test_list_configured_all(self):
        self.args.append("-l")
        self.args.append("--all")
        grids_command(self.args)
        captured_output = sys.stdout.getvalue()
        for grid in GRID_NAMES + UNUSED_GRID_NAMES:
            assert grid in captured_output

        number_of_lines = sum(1 for line in captured_output.split("\n") if line)

        assert number_of_lines == len(UNUSED_GRID_NAMES) + len(GRID_NAMES)
コード例 #5
0
    def test_list_configured(self):
        self.args.append('-l')
        with capture() as (out, err):
            grids_command(self.args)
        captured_output = out.getvalue()
        for grid in GRID_NAMES:
            assert grid in captured_output

        number_of_lines = sum(1 for line in captured_output.split('\n') if line)

        assert number_of_lines == len(GRID_NAMES)
コード例 #6
0
ファイル: test_util_grids.py プロジェクト: GeoDodo/mapproxy
    def test_list_configured_all(self):
        self.args.append('-l')
        self.args.append('--all')
        with capture() as (out, err):
            grids_command(self.args)
        captured_output = out.getvalue()
        for grid in GRID_NAMES + UNUSED_GRID_NAMES:
            assert grid in captured_output

        number_of_lines = sum(1 for line in captured_output.split('\n') if line)

        assert number_of_lines == len(UNUSED_GRID_NAMES) + len(GRID_NAMES)
コード例 #7
0
    def test_list_configured_all(self):
        self.args.append('-l')
        self.args.append('--all')
        grids_command(self.args)
        captured_output = sys.stdout.getvalue()
        for grid in GRID_NAMES + UNUSED_GRID_NAMES:
            assert grid in captured_output

        number_of_lines = sum(1 for line in captured_output.split('\n')
                              if line)

        assert number_of_lines == len(UNUSED_GRID_NAMES) + len(GRID_NAMES)
コード例 #8
0
    def test_list_configured_all(self):
        self.args.append("-l")
        self.args.append("--all")
        with capture() as (out, err):
            grids_command(self.args)
        captured_output = out.getvalue()
        for grid in GRID_NAMES + UNUSED_GRID_NAMES:
            assert grid in captured_output

        number_of_lines = sum(1 for line in captured_output.split("\n")
                              if line)

        assert number_of_lines == len(UNUSED_GRID_NAMES) + len(GRID_NAMES)
コード例 #9
0
 def test_all_grids(self):
     grids_command(self.args)
     captured_output = sys.stdout.getvalue()
     assert "GLOBAL_MERCATOR" in captured_output
     assert "origin*: 'll'" in captured_output
コード例 #10
0
 def test_display_single_grid(self):
     self.args.append('-g')
     self.args.append('GLOBAL_MERCATOR')
     grids_command(self.args)
     captured_output = sys.stdout.getvalue()
     assert "GLOBAL_MERCATOR" in captured_output
コード例 #11
0
ファイル: test_util_grids.py プロジェクト: quiqua/mapproxy
 def test_ignore_case(self):
     self.args.append("-g")
     self.args.append("global_geodetic")
     grids_command(self.args)
     captured_output = sys.stdout.getvalue()
     assert "GLOBAL_GEODETIC" in captured_output
コード例 #12
0
 def test_all_grids(self):
     with capture() as (out, err):
         grids_command(self.args)
     captured_output = out.getvalue()
     assert "GLOBAL_MERCATOR" in captured_output
     assert "origin*: 'll'" in captured_output
コード例 #13
0
 def test_all_grids(self):
     grids_command(self.args)
     captured_output = sys.stdout.getvalue()
     assert "GLOBAL_MERCATOR" in captured_output
     assert "origin*: 'sw'" in captured_output
コード例 #14
0
 def test_display_single_grid(self):
     self.args.append('-g')
     self.args.append('GLOBAL_MERCATOR')
     grids_command(self.args)
     captured_output = sys.stdout.getvalue()
     assert "GLOBAL_MERCATOR" in captured_output
コード例 #15
0
 def test_config_not_found(self):
     self.args = ["command_dummy", "-f", "foo.bar"]
     with capture() as (_, err):
         with pytest.raises(SystemExit):
             grids_command(self.args)
     assert err.getvalue().startswith("ERROR:")