public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Benjamin A. Beasley <code@musicinmybrain.net>
To: git-commits@fedoraproject.org
Subject: [rpms/python-libcst] f44: Test both the pure-Python parser and the Rust parser
Date: Thu, 09 Jul 2026 05:13:45 GMT	[thread overview]
Message-ID: <178357402548.1.18432286988312369873.rpms-python-libcst-16201f8946c9@fedoraproject.org> (raw)

A new commit has been pushed.

Repo   : rpms/python-libcst
Branch : f44
Commit : 16201f8946c9ee6194896d3e32eb108e1bb2c9c9
Author : Benjamin A. Beasley <code@musicinmybrain.net>
Date   : 2026-07-07T11:19:59+01:00
Stats  : +18/-8 in 1 file(s)
URL    : https://src.fedoraproject.org/rpms/python-libcst/c/16201f8946c9ee6194896d3e32eb108e1bb2c9c9?branch=f44

Log:
Test both the pure-Python parser and the Rust parser

---
diff --git a/python-libcst.spec b/python-libcst.spec
index 3840ad0..b58adfa 100644
--- a/python-libcst.spec
+++ b/python-libcst.spec
@@ -104,19 +104,29 @@ cd ..
 
 %check
 %pyproject_check_import -e 'libcst.tests.*'
+
 %if %{with tests}
+mod='%{buildroot}%{python3_sitearch}/libcst'
 # Omit fuzz tests. These don’t make much sense downstream, and would require
 # hypothesmith, which hasn’t been successfully rebuilt for Python 3.15.
-ignore="${ignore-} --ignore=libcst/tests/test_fuzz.py"
+ignore="${ignore-} --ignore=${mod}/tests/test_fuzz.py"
 %if %{without all_tests}
-ignore="${ignore-} --ignore=libcst/codegen/tests/test_codegen_clean.py"
-ignore="${ignore-} --ignore=libcst/metadata/tests/test_type_inference_provider.py"
+ignore="${ignore-} --ignore=${mod}/codegen/tests/test_codegen_clean.py"
+ignore="${ignore-} --ignore=${mod}/metadata/tests/test_type_inference_provider.py"
 %endif
-# libcst.native is not available in build directory
-# test the pure Python codepath for now
-# (TODO: test *both* paths)
-export LIBCST_PARSER_TYPE=pure
-%pytest ${ignore-} -v
+
+# Pure-Python parser
+LIBCST_PARSER_TYPE=pure %pytest --import-mode=append ${ignore-} -v "${mod}"
+
+# A few tests aren’t practical to run when not building in-place
+# Some kind of PYTHONPATH issue, it looks like
+ignore="${ignore-} --ignore=${mod}/codemod/tests/test_codemod_cli.py"
+# Broken path to fixtures for native tests (tries to find them at
+# %%{buildroot}%%{python3_sitearch/native/libcst/tests/fixtures)
+ignore="${ignore-} --ignore=${mod}/tests/test_roundtrip.py"
+
+# Rust (native) parser
+%pytest --import-mode=append ${ignore-} -k "${k-}" -v "${mod}"
 %endif
 
 

                 reply	other threads:[~2026-07-09  5:13 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=178357402548.1.18432286988312369873.rpms-python-libcst-16201f8946c9@fedoraproject.org \
    --to=code@musicinmybrain.net \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox