PulseExploreJournal ClubDebatesTrendingResearchersJournals
Instagram
HomeExploreJournal ClubTrending
Synapse
⌘+K
Synapse
September 18, 20250 citations

On the Implementation of OS-Specific Tests: The CPython Case

View Full Paper
RJRicardo JobAHAndré Hora

Key Points

  • OS-specific tests are found in 13% of analyzed test files in cpython, highlighting their prevalence.
  • OS Identification APIs are utilized in 53.46% of test codes, while @unittest.skipUnless is the most common test-skipping method.
  • A total of 170 issues related to OS-specific tests were identified, with Windows being the most commonly targeted platform.
  • The findings underline the necessity for effective testing across multiple platforms to address common issues.

Abstract

Modern software systems are frequently developed and tested across multiple platforms (e.g., Windows, Linux, and macOS). In the software testing context, practitioners adapt the tests to run differently according to the target platform. These tests, which need to identify the platform on which they will be executed, are referred to as OS-specific tests. In this paper, we present an empirical study to evaluate how developers implement OS-specific tests in CPython, which is the reference implementation project for the Python programming language. Then, we mine this project and assess their OS-specific tests quantitatively. For this, we propose three research questions to assess the frequency, location, and issues related to OS-specific tests. Our results show that OS-specific tests are common in the CPython project, and 13% of the analyzed test files are OS-specific tests (RQ1). OS Identification APIs are used more frequently in test code (53.46%), and the test decorator @unittest.skipUnless is the most used to skip tests depending on the platform (RQ2).We also find 170 issues related to OS-specific tests in CPython, and Windows is the most targeted platform (RQ3). Lastly, we discussed practical implications for practitioners and researchers. Based on our findings, we emphasized the importance of testing across multiple platforms and examined the relationship between issues and OS-specific tests, among other insights.

Ask AI
Helpful
Bookmark
Share
View Full Paper

Cite This Study

Job et al. (2025) studied this question.

synapsesocial.com/papers/68d461bc31b076d99fa60b1fhttps://doi.org/10.5753/sast.2025.13918
Ask AI
Helpful
Bookmark
Share
View Full Paper