Skip to content

Commit

Permalink
remove unnecessary chdir
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielYang59 committed Dec 5, 2024
1 parent ebd48ce commit f6bda1e
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions tests/io/test_lmto.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,8 @@

class TestCtrl(MatSciTest):
def setup_method(self):
os.chdir(TEST_DIR)
self.ref_bise = LMTOCtrl.from_file(filename=f"{TEST_DIR}/CTRL.BiSe")
self.ref_fe = LMTOCtrl.from_file()

def teardown_method(self):
os.chdir(MODULE_DIR)
self.ref_fe = LMTOCtrl.from_file(filename=f"{TEST_DIR}/CTRL")

def test_dict(self):
assert self.ref_bise == LMTOCtrl.from_dict(self.ref_bise.as_dict())
Expand All @@ -49,13 +45,9 @@ def test_read_write(self):

class TestCopl(MatSciTest):
def setup_method(self):
os.chdir(TEST_DIR)
self.copl_bise = LMTOCopl("COPL.BiSe")
self.copl_bise_eV = LMTOCopl(filename="COPL.BiSe", to_eV=True)
self.copl_fe = LMTOCopl()

def teardown_method(self):
os.chdir(MODULE_DIR)
self.copl_bise = LMTOCopl(f"{TEST_DIR}/COPL.BiSe")
self.copl_bise_eV = LMTOCopl(filename=f"{TEST_DIR}/COPL.BiSe", to_eV=True)
self.copl_fe = LMTOCopl(f"{TEST_DIR}/COPL")

def test_attributes(self):
assert not self.copl_bise.is_spin_polarized
Expand Down

0 comments on commit f6bda1e

Please sign in to comment.