Skip to content

Commit

Permalink
Fix detection of "import unittest" files on Run Script
Browse files Browse the repository at this point in the history
  • Loading branch information
srizzo authored and infininight committed Sep 24, 2020
1 parent 89b5ac1 commit 0507654
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Commands/Run Script.plist
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ TextMate::Executor.make_project_master_current_document
ENV["PYTHONPATH"] = ENV["TM_BUNDLE_SUPPORT"] + (ENV.has_key?("PYTHONPATH") ? ":" + ENV["PYTHONPATH"] : "")
is_test_script = ENV["TM_FILEPATH"] =~ /(?:\b|_)(?:test)(?:\b|_)/ or
is_test_script = ENV["TM_FILEPATH"] =~ /(?:\b|_)(?:test)(?:\b|_)/ ||
File.read(ENV["TM_FILEPATH"]) =~ /\bimport\b.+(?:unittest)/
TextMate::Executor.run(ENV["TM_PYTHON"] || "python", "-u", ENV["TM_FILEPATH"], :create_error_pipe => true, :use_hashbang => !ENV.has_key?('TM_PYTHON')) do |str, type|
Expand Down

0 comments on commit 0507654

Please sign in to comment.