8000 gh-105540: Convert `pytest` tests of `cases_generator` to regular tests by sobolevn · Pull Request #106713 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-105540: Convert pytest tests of cases_generator to regular tests #106713

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Jul 16, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix Linux build
  • Loading branch information
sobolevn committed Jul 13, 2023
commit f22fd88d15483849cec32e123458cb5f20762c3f
16 changes: 11 additions & 5 deletions Lib/test/test_generated_cases.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import tempfile
import unittest
import os
import shutil

from test import test_tools

Expand Down Expand Up @@ -76,10 +75,17 @@ def setUp(self) -> None:
self.temp_executor_filename = os.path.join(self.temp_dir, "executor.txt")

def tearDown(self) -> None:
try:
shutil.rmtree(self.temp_dir)
except:
pass
for filename in [
self.temp_input_filename,
self.temp_output_filename,
self.temp_metadata_filename,
self.temp_pymetadata_filename,
self.temp_executor_filename,
]:
try:
os.remove(filename)
except:
pass
super().tearDown()

def run_cases_test(self, input: str, expected: str):
Expand Down
0