Exemple #1
0
    def test_complete_open(self):
        """Test providing auto-completion for open."""
        shell = VisaShell()
        completions = shell.complete_open("TCPIP", 0, 0, 0)
        assert to_canonical_name(
            RESOURCE_ADDRESSES["TCPIP::INSTR"]) in completions

        # Test getting an alias from the completion
        completions = shell.complete_open("tcp", 0, 0, 0)
        assert "tcpip" in completions
    def test_complete_open(self):
        """Test providing auto-completion for open.

        """
        shell = VisaShell()
        completions = shell.complete_open("TCPIP::", 0, 0, 0)
        self.assertIn(RESOURCE_ADDRESSES["TCPIP::INSTR"], completions)

        # Test getting an alias from the completion
        completions = shell.complete_open("tcp", 0, 0, 0)
        self.assertIn('tcpip', completions)