Skip to content

Commit 252faf2

Browse files
authored
fix "assert_predicate" (#1976)
1 parent 224ed63 commit 252faf2

34 files changed

+50
-50
lines changed

Formula/abyss-explorer.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def install
2626

2727
test do
2828
assert_predicate bin/"abyss-explorer", :executable?
29-
assert_predicate libexec/"ABySS-explorer.jar", :exist?
29+
assert_path_exists libexec/"ABySS-explorer.jar"
3030
# This test fails on CI, though it succeeds locally.
3131
assert_match "Build", shell_output("#{bin}/abyss-explorer --version") unless ENV["HOMEBREW_GITHUB_ACTIONS"]
3232
end

Formula/alfred.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,6 @@ def install
3535
system "#{bin}/alfred", "qc", "-r", testpath/"example/E.coli.fa.gz",
3636
"-j", testpath/"ecoli.json.gz",
3737
testpath/"example/E.coli.cram"
38-
assert_predicate testpath/"ecoli.json.gz", :exist?
38+
assert_path_exists testpath/"ecoli.json.gz"
3939
end
4040
end

Formula/alphafill.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def install
5656
system "#{bin}/alphafill", "process", "--config", "#{testpath}/alphafill.conf",
5757
"#{prefix}/test/afdb-v4/P2/AF-P29373-F1-model_v4.cif.gz",
5858
"#{testpath}/out.cif.gz"
59-
assert_predicate testpath/"out.cif.gz", :exist?
59+
assert_path_exists testpath/"out.cif.gz"
6060
assert_match "RETINOIC ACID", shell_output("gunzip -c #{testpath}/out.cif.gz")
6161
end
6262
end

Formula/barrnap.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,6 @@ def install
3030
assert_match "Name=16S_rRNA", shell_output("#{bin}/barrnap -q --kingdom mito #{prefix}/examples/mitochondria.fna")
3131
out = testpath/"hits.fa"
3232
system "#{bin}/barrnap", "--outseq", out, "#{prefix}/examples/small.fna"
33-
assert_predicate out, :exist?
33+
assert_path_exists out
3434
end
3535
end

Formula/circos.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def install
3737

3838
test do
3939
system bin/"circos", "-conf", libexec/"example/etc/circos.conf", "-debug_group", "summary,timer"
40-
assert_predicate testpath/"circos.png", :exist?
41-
assert_predicate testpath/"circos.svg", :exist?
40+
assert_path_exists testpath/"circos.png"
41+
assert_path_exists testpath/"circos.svg"
4242
end
4343
end

Formula/cluster-picker.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,6 @@ def install
3838
EOT
3939
# run
4040
assert_match "Reading", shell_output("#{bin}/ClusterPicker #{fa} #{nw} 0.9 2>&1")
41-
assert_predicate testpath/"test_clusterPicks_log.txt", :exist?
41+
assert_path_exists testpath/"test_clusterPicks_log.txt"
4242
end
4343
end

Formula/conform-gt.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def install
2525

2626
test do
2727
assert_predicate bin/"conform-gt", :executable?
28-
assert_predicate libexec/"conform-gt.jar", :exist?
28+
assert_path_exists libexec/"conform-gt.jar"
2929
assert_match "usage: java -jar conform-gt.", shell_output("#{bin}/conform-gt")
3030
end
3131
end

Formula/delly.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,6 @@ def install
3939
test do
4040
assert_match version.to_s, shell_output("#{bin}/delly --version 2>&1")
4141
system "#{bin}/delly", "call", "-g", prefix/"example/ref.fa", "-o", testpath/"sr.bcf", prefix/"example/sr.bam"
42-
assert_predicate testpath/"sr.bcf", :exist?
42+
assert_path_exists testpath/"sr.bcf"
4343
end
4444
end

Formula/eigensoft.rb

+10-10
Original file line numberDiff line numberDiff line change
@@ -78,21 +78,21 @@ def caveats
7878
cp_r samples/"EIGENSTRAT", testpath
7979
cd "EIGENSTRAT" do
8080
assert_match(/^gc.perl example.chisq example.chisq.GC$/, shell_output("perl example.perl"))
81-
assert_predicate Pathname.pwd/"example.pca", :exist?
82-
assert_predicate Pathname.pwd/"example.pca.evec", :exist?
83-
assert_predicate Pathname.pwd/"example.plot.pdf", :exist?
84-
assert_predicate Pathname.pwd/"example.plot.ps", :exist?
85-
assert_predicate Pathname.pwd/"example.plot.xtxt", :exist?
81+
assert_path_exists Pathname.pwd/"example.pca"
82+
assert_path_exists Pathname.pwd/"example.pca.evec"
83+
assert_path_exists Pathname.pwd/"example.plot.pdf"
84+
assert_path_exists Pathname.pwd/"example.plot.ps"
85+
assert_path_exists Pathname.pwd/"example.plot.xtxt"
8686
end
8787

8888
cp_r samples/"POPGEN", testpath
8989
cd "POPGEN" do
9090
assert_match(/^evec2pca.perl 2 example.evec example.ind example.pca$/, shell_output("perl example.perl"))
91-
assert_predicate Pathname.pwd/"example.pca", :exist?
92-
assert_predicate Pathname.pwd/"example.evec", :exist?
93-
assert_predicate Pathname.pwd/"example.plot.pdf", :exist?
94-
assert_predicate Pathname.pwd/"example.plot.ps", :exist?
95-
assert_predicate Pathname.pwd/"example.plot.xtxt", :exist?
91+
assert_path_exists Pathname.pwd/"example.pca"
92+
assert_path_exists Pathname.pwd/"example.evec"
93+
assert_path_exists Pathname.pwd/"example.plot.pdf"
94+
assert_path_exists Pathname.pwd/"example.plot.ps"
95+
assert_path_exists Pathname.pwd/"example.plot.xtxt"
9696
end
9797
end
9898
end

Formula/falco.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def install
4343
@BCFFFFFHHHCFBHHIJJJICFGIIGIHHG3CEGEBA;@AEGHE:BEB<A@=B@@AAD>:?3>>:ABD5;BDBDACDACDBAC39C>@ACCDDCEEEDD
4444
EOS
4545
system "#{bin}/falco", "#{testpath}/test.fq"
46-
assert_predicate testpath/"summary.txt", :exist?
47-
assert_predicate testpath/"fastqc_report.html", :exist?
46+
assert_path_exists testpath/"summary.txt"
47+
assert_path_exists testpath/"fastqc_report.html"
4848
end
4949
end

Formula/faqcs.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def install
4242
@BCFFFFFHHHCFBHHIJJJICFGIIGIHHG3CEGEBA;@AEGHE:BEB<A@=B@@AAD>:?3>>:ABD5;BDBDACDACDBAC39C>@ACCDDCEEEDD
4343
EOS
4444
system "#{bin}/FaQCs", "-u", "#{testpath}/test.fq", "-d", testpath, "-qc_only"
45-
assert_predicate testpath/"QC.stats.txt", :exist?
46-
assert_predicate testpath/"QC_qc_report.pdf", :exist?
45+
assert_path_exists testpath/"QC.stats.txt"
46+
assert_path_exists testpath/"QC_qc_report.pdf"
4747
end
4848
end

Formula/fastani.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def install
4646
"-r", pkgshare/"data/Escherichia_coli_str_K12_MG1655.fna",
4747
"-o", testpath/"out",
4848
"--matrix"
49-
assert_predicate testpath/"out", :exist?
50-
assert_predicate testpath/"out.matrix", :exist?
49+
assert_path_exists testpath/"out"
50+
assert_path_exists testpath/"out.matrix"
5151
end
5252
end

Formula/gffcompare.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,6 @@ def install
2727
cp_r prefix/"examples", testpath
2828
system "#{bin}/gffcompare", "-r", "#{testpath}/examples/annotation.gff",
2929
"#{testpath}/examples/transcripts.gtf"
30-
assert_predicate testpath/"examples/gffcmp.transcripts.gtf.tmap", :exist?
30+
assert_path_exists testpath/"examples/gffcmp.transcripts.gtf.tmap"
3131
end
3232
end

Formula/gzstream.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def install
2525
end
2626

2727
test do
28-
assert_predicate include/"gzstream.h", :exist?
29-
assert_predicate lib/"libgzstream.a", :exist?
28+
assert_path_exists include/"gzstream.h"
29+
assert_path_exists lib/"libgzstream.a"
3030
end
3131
end

Formula/hap-ibd.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def install
2525

2626
test do
2727
assert_predicate bin/"hap-ibd", :executable?
28-
assert_predicate libexec/"hap-ibd.jar", :exist?
28+
assert_path_exists libexec/"hap-ibd.jar"
2929
assert_match(/^Syntax: java -jar hap-ibd.jar\b/, shell_output("#{bin}/hap-ibd"))
3030
end
3131
end

Formula/harvest-tools.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,6 @@ def install
6767
"-x", pkgshare/"test/test2.xmfa",
6868
"-v", pkgshare/"test/test2.vcf",
6969
"-o", testpath/"out.ggr"
70-
assert_predicate testpath/"out.ggr", :exist?
70+
assert_path_exists testpath/"out.ggr"
7171
end
7272
end

Formula/hisat2.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,6 @@ def install
6767

6868
test do
6969
system "#{bin}/hisat2-build", "-p", "12", pkgshare/"example/reference/22_20-21M.fa", "genome_index"
70-
assert_predicate testpath/"genome_index.1.ht2", :exist?
70+
assert_path_exists testpath/"genome_index.1.ht2"
7171
end
7272
end

Formula/ibdseq.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def install
2525

2626
test do
2727
assert_predicate bin/"ibdseq", :executable?
28-
assert_predicate libexec/"ibdseq.jar", :exist?
28+
assert_path_exists libexec/"ibdseq.jar"
2929
assert_match "usage: java -jar ibdseq.jar", shell_output("#{bin}/ibdseq")
3030
end
3131
end

Formula/last.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def install
2424
test do
2525
assert_match version.to_s, shell_output("#{bin}/lastal -V")
2626
system "#{bin}/lastdb", testpath/"db", pkgshare/"examples/mouseMito.fa"
27-
assert_predicate testpath/"db.suf", :exist?
27+
assert_path_exists testpath/"db.suf"
2828
assert_match "lambda=",
2929
shell_output("#{bin}/lastal #{testpath}/db #{pkgshare}/examples/chickenMito.fa")
3030
end

Formula/libgff.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def install
2121
end
2222

2323
test do
24-
assert_predicate lib/"libgff.a", :exist?
25-
assert_predicate include/"gff.h", :exist?
24+
assert_path_exists lib/"libgff.a"
25+
assert_path_exists include/"gff.h"
2626
end
2727
end

Formula/mapcaller.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,6 @@ def install
3131
"-f2", pkgshare/"test/r2.fq",
3232
"-vcf", testpath/"out.vcf",
3333
"-t", "2"
34-
assert_predicate testpath/"out.vcf", :exist?
34+
assert_path_exists testpath/"out.vcf"
3535
end
3636
end

Formula/mashmap.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def install
3535
"-Y '#' " \
3636
"-o scerevisiae8.paf"
3737
system cmd
38-
assert_predicate testpath/"scerevisiae8.paf", :exist?
38+
assert_path_exists testpath/"scerevisiae8.paf"
3939
assert_match "UWOPS034614#1#chrMT", (testpath/"scerevisiae8.paf").read
4040
end
4141
end

Formula/megahit.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def install
3636
test do
3737
outdir = "megahit.outdir"
3838
system "#{bin}/megahit", "--12", "#{pkgshare}/test_data/r2.il.fa.bz2", "-o", outdir
39-
assert_predicate testpath/"#{outdir}/final.contigs.fa", :exist?
39+
assert_path_exists testpath/"#{outdir}/final.contigs.fa"
4040
assert_match version.to_s, shell_output("#{bin}/megahit_toolkit dumpversion 2>&1")
4141
end
4242
end

Formula/oma.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,6 @@ def install
6969
MTIHNVSLFTTIFNIFKFCVLYITSSLGISLERFIKCRKVKNINDIVSE
7070
EOS
7171
system "#{bin}/oma"
72-
assert_predicate testpath/"Output/HierarchicalGroups.orthoxml", :exist?
72+
assert_path_exists testpath/"Output/HierarchicalGroups.orthoxml"
7373
end
7474
end

Formula/phyx.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,6 @@ def install
3737
test do
3838
assert_match "Usage", shell_output("#{bin}/pxseqgen --help")
3939
system "#{bin}/pxseqgen", "-t", "#{pkgshare}/pxseqgen_example/seqgen_test.tre", "-o", "output.fa"
40-
assert_predicate testpath/"output.fa", :exist?
40+
assert_path_exists testpath/"output.fa"
4141
end
4242
end

Formula/plink2.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,6 @@ def install
4242

4343
test do
4444
system "#{bin}/plink2", "--dummy", "513", "1423", "0.02", "--out", "dummy_cc1"
45-
assert_predicate testpath/"dummy_cc1.pvar", :exist?
45+
assert_path_exists testpath/"dummy_cc1.pvar"
4646
end
4747
end

Formula/qtltools.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ def install
6666
cp resource("testdata_index").cached_download, testpath/"genes.50percent.chr22.bed.gz.tbi"
6767
system "#{bin}/QTLtools", "pca", "--bed", "genes.50percent.chr22.bed.gz", "--scale",
6868
"--center", "--out", "genes.50percent.chr22"
69-
assert_predicate testpath/"genes.50percent.chr22.pca_stats", :exist?
69+
assert_path_exists testpath/"genes.50percent.chr22.pca_stats"
7070
assert_match "prop_var", File.read("genes.50percent.chr22.pca_stats")
7171
end
7272
end

Formula/quast.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,6 @@ def install
8787
"-1", "#{testpath}/test_data/reads1.fastq.gz",
8888
"-2", "#{testpath}/test_data/reads2.fastq.gz",
8989
"-o", "output", "-t", "1", "--debug", "--glimmer"
90-
assert_predicate testpath/"output/report.pdf", :exist?
90+
assert_path_exists testpath/"output/report.pdf"
9191
end
9292
end

Formula/raxml.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def install
4343
system "#{bin}/raxmlHPC-SSE3", "-f", "a", "-m", "GTRGAMMA", "-p",
4444
"12345", "-x", "12345", "-N", "100",
4545
"-s", "aln.phy", "-n", "ts"
46-
assert_predicate testpath/"RAxML_bipartitions.ts", :exist?,
46+
assert_path_exists testpath/"RAxML_bipartitions.ts",
4747
"Failed to create RAxML_bipartitions.ts"
4848
end
4949
end

Formula/seqerr.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def install
2525

2626
test do
2727
assert_predicate bin/"seqerr", :executable?
28-
assert_predicate libexec/"seqerr.jar", :exist?
28+
assert_path_exists libexec/"seqerr.jar"
2929
assert_match "usage: java -jar seqerr.jar", shell_output("#{bin}/seqerr")
3030
end
3131
end

Formula/trf.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def install
3131
EOS
3232
shell_output("#{bin}/trf #{testpath}/test.fa 2 7 7 80 10 50 500 2>&1", 1)
3333
out = testpath/"test.fa.2.7.7.80.10.50.500.1.txt.html"
34-
assert_predicate out, :exist?
34+
assert_path_exists out
3535
assert_match "Length: 180", File.read(out)
3636
end
3737
end

Formula/trinity.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,6 @@ def install
9898
"--seqType", "fq", "--max_memory", "1G", "--SS_lib_type", "RF",
9999
"--left", testpath/"reads.left.fq.gz,reads2.left.fq.gz",
100100
"--right", testpath/"reads.right.fq.gz,reads2.right.fq.gz"
101-
assert_predicate testpath/"trinity_out_dir/both.fa", :exist?
101+
assert_path_exists testpath/"trinity_out_dir/both.fa"
102102
end
103103
end

Formula/trnascan.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def install
3939

4040
test do
4141
system "#{bin}/tRNAscan-SE", "-b", "test.bed", "#{prefix}/Demo/Example1.fa"
42-
assert_predicate testpath/"test.bed", :exist?
42+
assert_path_exists testpath/"test.bed"
4343
assert_equal File.read("test.bed"), File.read(prefix/"Demo/Example1-tRNAs.bed")
4444
end
4545
end

Formula/unicycler.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def install
4444
assert_match "usage", shell_output("#{bin}/unicycler --help")
4545
resources.each { |r| r.stage testpath }
4646
system "#{bin}/unicycler", "-1", "short_reads_1.fastq", "-2", "short_reads_2.fastq", "-o", "test"
47-
assert_predicate testpath/"test/assembly.gfa", :exist?
48-
assert_predicate testpath/"test/assembly.fasta", :exist?
47+
assert_path_exists testpath/"test/assembly.gfa"
48+
assert_path_exists testpath/"test/assembly.fasta"
4949
end
5050
end

0 commit comments

Comments
 (0)