Path: csiph.com!news.neodome.net!news.mixmin.net!aioe.org!bofh.it!news.nic.it!robomod From: zhao feng Newsgroups: linux.debian.maint.python Subject: Anyway to omit some tests within unittest framework? Date: Sat, 13 Jun 2020 15:30:01 +0200 Message-ID: X-Mailbox-Line: From debian-python-request@lists.debian.org Sat Jun 13 13:21:09 2020 Old-Return-Path: X-Amavis-Spam-Status: No, score=-6.929 tagged_above=-10000 required=5.3 tests=[BAYES_00=-2, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, LDO_WHITELIST=-5, MURPHY_DRUGS_REL8=0.02, RCVD_IN_DNSWL_NONE=-0.0001] autolearn=ham autolearn_force=no X-Policyd-Weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 CL_IP_EQ_HELO_IP=-2 (check from: .gmail. - helo: .mail-ej1-x636.google. - helo-domain: .google.) FROM/MX_MATCHES_HELO(DOMAIN)=-2; rate: -5.5 Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=VpoU/woR2D9JXX/0aGGSUfR/S/32Q0X4dzYML28ANVI=; b=qLJKmcejeyS1aY+tneHIARat9CaHNPALEYQBlXa39Wv5zRxMUTX1sd0lXoH+HPOsWI dJcwlAKfzr/8kRENeq1B+ReUGrSzlCf0sULnmaBQPu4MUptCjkeU3iKgUMOmqlvpuqPi 4QYOJ+/fd4Yxkp20GlbUPV7a9wKccVkzb14yfz7i7TZY7KRqGFyU6kTGqGVCYBuFl5Un txn3qh30sblVYjTv3iuw8FbZYkJBCzDO37bDwPTv1nn0CT5l3IJEJLjALgigq5VKC5kK MEDDFR/2rlPSXpr3p4IB8NjsGzPf2fLQO/x1+qB49m3UPwtjr0kpa56geNhbmxXrZJwI l5uQ== X-Google-Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=VpoU/woR2D9JXX/0aGGSUfR/S/32Q0X4dzYML28ANVI=; b=cFkf4pq3aGHGSJyHcD03a4xpyHZ1rgCvTrH4NFXr2MbOtC3+AN/E5jVV+Up18n3I1o sSE+Yy3MJn9mqW/GcEzkOYCsPgqNbwHiTpRPZpKeZ0HKwlzbXkbT8mH/Ea/7GhnzuAZ8 UPjqlk8zHvTlWbAhpthl2Q4nHh9E6atiIqDv2UC9qfzM5YYLCH2DqJx10ahVsYCLX8ui esZkOn7G4JwdpIHheUTbits1ItruRVM/OqYLu4/x99Cl5VmfojmAG54PNbwpy1lbR4OV B2WfMmyyYr9Uy1V61eEVPLwbPWOORWWbVfi+g/Qn3TMxe+JrOJd6BDH66ayaa/uZP1Dx sMQg== X-Gm-Message-State: AOAM531yIjYR/lEYoxiH53NvUZ3U1xX7vEsG9Vx5eLQmIajlKEXgnnjE Sab3HnHe2j5sajVuZJ7mBAfD1Ogj0oXfUDIAhHmhtZiS79c= X-Google-SMTP-Source: ABdhPJzSMsr0soUbg1LqBGQ6j4h4x+HXEhwIn21uznnjrbYsL3kPPW/J5NqSV2U4oy+kwEYVIB2YO82wa8ets5Al2yw= X-Received: by 2002:a17:906:6890:: with SMTP id n16mr5003053ejr.553.1592053534557; Sat, 13 Jun 2020 06:05:34 -0700 (PDT) MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" X-Mailing-List: archive/latest/18360 List-ID: List-URL: List-Archive: https://lists.debian.org/msgid-search/CAM6iwbdbQktoxxvgoVnLkPa-kfFkaAwn7w4b=+JxdYymnaDAdg@mail.gmail.com Approved: robomod@news.nic.it Lines: 22 Organization: linux.* mail to news gateway Sender: robomod@news.nic.it X-Original-Date: Sat, 13 Jun 2020 21:05:23 +0800 X-Original-Message-ID: Xref: csiph.com linux.debian.maint.python:12653 Recently I want to make a debian package of a scientific computing library. I try to use pybuild in my debian/rules. I found some tests failed because the test code downloads some data from the internet when the test code is running for the first time. I want to omit these tests. However, the test uses Python built-in unittests I do not find any switch to omit a small number of tests (it seems only supporting selecting which tests to include). The document in pybuild mentions that it is possible for `pytest` framework (https://wiki.debian.org/Python/Pybuild#debian.2Fcontrol). Since pybuild wraps the command line switch of these frameworks. I think it is hard to find solution on pybuild level if unittests do not support it. As far as I can figure out, I can inject some decorator to the test code to omit these test functions, I do not know whether it is acceptable to make such "patch" in debian. I wonder if there were any way to deal with this kind of problems. Some additional informations: https://salsa.debian.org/zhaofeng-shu33-guest/ete is the source code repo. Thanks