-
Notifications
You must be signed in to change notification settings - Fork 393
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #173 from princeton-nlp/print-pulls-gh-token
Fix: Allow to set GH token from env var in collect/print_pulls
- Loading branch information
Showing
5 changed files
with
50 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import subprocess | ||
|
||
|
||
def test_collect_smoke_test(): | ||
cmd = ["python", "-m", "swebench.collect.print_pulls", "--help"] | ||
result = subprocess.run(cmd, capture_output=True) | ||
print(result.stdout) | ||
print(result.stderr) | ||
assert result.returncode == 0 | ||
|
||
|
||
def test_collect_one(tmp_path): | ||
cmd = ["python", "-m", "swebench.collect.print_pulls", "pvlib/pvlib-python", str(tmp_path/ "out.txt"), "--max-pulls", "1"] | ||
print(" ".join(cmd)) | ||
result = subprocess.run(cmd, capture_output=True) | ||
print(result.stdout) | ||
print(result.stderr) | ||
assert result.returncode == 0 | ||
|
||
|
||
def test_collect_ds(tmp_path): | ||
cmd = ["python", "-m", "swebench.collect.build_dataset", "tests/test_data/pvlib.jsonl", str(tmp_path/ "out.jsonl")] | ||
print(" ".join(cmd)) | ||
result = subprocess.run(cmd, capture_output=True) | ||
print(result.stdout) | ||
print(result.stderr) | ||
assert result.returncode == 0 |
Oops, something went wrong.