-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
working on integration tests, munging some types
- Loading branch information
1 parent
393528f
commit d5a5f79
Showing
7 changed files
with
104 additions
and
9 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
Empty file.
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,36 @@ | ||
# Copyright 2019 HTCondor Team, Computer Sciences Department, | ||
# University of Wisconsin-Madison, WI. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
import pytest | ||
|
||
import htcondor_jobs as jobs | ||
|
||
|
||
def test_and_of_cluster_handles_gives_right_number_of_jobs_in_query(long_sleep): | ||
a = jobs.submit(long_sleep, count=1) | ||
b = jobs.submit(long_sleep, count=1) | ||
|
||
num_jobs = len(list((a & b).query())) | ||
|
||
assert num_jobs == 0 | ||
|
||
|
||
def test_or_of_cluster_handles_gives_right_number_of_jobs_in_query(long_sleep): | ||
a = jobs.submit(long_sleep, count=1) | ||
b = jobs.submit(long_sleep, count=1) | ||
|
||
num_jobs = len(list((a | b).query())) | ||
|
||
assert num_jobs == 2 |
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,39 @@ | ||
# Copyright 2019 HTCondor Team, Computer Sciences Department, | ||
# University of Wisconsin-Madison, WI. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
import pytest | ||
|
||
import htcondor_jobs as jobs | ||
|
||
|
||
def get_job_attr(handle, attr): | ||
ad = next(handle.query(projection=[attr])) | ||
return ad[attr] | ||
|
||
|
||
def test_change_request_memory(long_sleep): | ||
handle = jobs.submit(long_sleep, count=1) | ||
|
||
handle.edit("RequestMemory", 12345) | ||
|
||
assert get_job_attr(handle, "RequestMemory") == 12345 | ||
|
||
|
||
def test_change_executable(long_sleep): | ||
handle = jobs.submit(long_sleep, count=1) | ||
|
||
handle.edit("Executable", "hello") | ||
|
||
assert get_job_attr(handle, "Executable") == "hello" |