Skip to content

Commit 66e0d7e

Browse files
use context managers for tests/test_pdf.py
1 parent 35bda52 commit 66e0d7e

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

tests/test_pdf.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -356,8 +356,8 @@ def test_pdf_integration_shapesys_zeros(backend):
356356
def test_pdf_integration_histosys(backend):
357357
with open(
358358
"validation/data/2bin_histosys_example2.json", encoding="utf-8"
359-
) as spec_file:
360-
source = json.load(spec_file)
359+
) as source_file:
360+
source = json.load(source_file)
361361
spec = {
362362
'channels': [
363363
{
@@ -438,8 +438,8 @@ def test_pdf_integration_histosys(backend):
438438
def test_pdf_integration_normsys(backend):
439439
with open(
440440
"validation/data/2bin_histosys_example2.json", encoding="utf-8"
441-
) as spec_file:
442-
source = json.load(spec_file)
441+
) as source_file:
442+
source = json.load(source_file)
443443
spec = {
444444
'channels': [
445445
{
@@ -502,8 +502,8 @@ def test_pdf_integration_normsys(backend):
502502
def test_pdf_integration_shapesys(backend):
503503
with open(
504504
"validation/data/2bin_histosys_example2.json", encoding="utf-8"
505-
) as spec_file:
506-
source = json.load(spec_file)
505+
) as source_file:
506+
source = json.load(source_file)
507507
spec = {
508508
'channels': [
509509
{
@@ -628,8 +628,8 @@ def test_invalid_modifier_name_resuse():
628628
def test_override_paramset_defaults():
629629
with open(
630630
"validation/data/2bin_histosys_example2.json", encoding="utf-8"
631-
) as spec_file:
632-
source = json.load(spec_file)
631+
) as source_file:
632+
source = json.load(source_file)
633633
spec = {
634634
'channels': [
635635
{
@@ -664,8 +664,8 @@ def test_override_paramset_defaults():
664664
def test_override_paramsets_incorrect_num_parameters():
665665
with open(
666666
"validation/data/2bin_histosys_example2.json", encoding="utf-8"
667-
) as spec_file:
668-
source = json.load(spec_file)
667+
) as source_file:
668+
source = json.load(source_file)
669669
spec = {
670670
'channels': [
671671
{

0 commit comments

Comments
 (0)