Пример #1
0
    def test_run(self):
        settings_list = [1, 1, 1, 1, 1, 1]
        S_DIR = os.path.dirname(os.path.abspath(__file__)) + "/region_files"

        test_num = "t2"
        t_u = TestUtils()
        t_u.copy(S_DIR, test_num, settings_list)

        self.assertTrue(os.path.exists(S_DIR + "_copy/" + test_num))
        self.assertTrue(t_u.are_files_equal(S_DIR, test_num))
Пример #2
0
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

import java.net.NetworkInterface
import java.net.InetAddress
import vertx
from test_utils import TestUtils

tu = TestUtils()

tu.check_thread()

peer1 = vertx.create_datagram_socket()
peer2 = vertx.create_datagram_socket()


class DatagramTest(object):
    def test_send_receive(self):
        @peer2.exception_handler
        def exception_handler(err):
            tu.azzert(False)

        def peer2_listen_handler(err, serv):
            tu.check_thread()