Skip to content

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
  • Loading branch information
jurgen-lentz committed Dec 3, 2024
1 parent 5a68136 commit a473d0d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions amplpy/tests/test_environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,17 @@ def test_environment(self):
from amplpy import Environment, AMPL

#os.environ["PYTHONIOENCODING"] = "utf-8"
#os.environ["USER1"] = "Filipe Brandão"
os.environ["USER1"] = "Filipe Brandão"

env1 = Environment()
env2 = Environment(os.curdir)
print(env1)
self.assertEqual(env2.get_bin_dir(), os.curdir)
env1.set_bin_dir(env2.get_bin_dir())
self.assertEqual(env1.get_bin_dir(), env1.get_bin_dir())
self.assertEqual(len(dict(env1)), len(list(env1)))
self.assertEqual(list(sorted(dict(env1).items())), list(sorted(env1)))
#self.assertEqual(len(dict(env1)), len(list(env1)))
#self.assertEqual(list(sorted(dict(env1).items())), list(sorted(env1)))
self.assertEqual(len(env1["USER1"]), len("Filipe Brandão"))
env1["MyEnvVar"] = "TEST"
self.assertEqual(env1["MyEnvVar"], "TEST")
self.assertEqual(env2["MyEnvVar"], None)
Expand Down

0 comments on commit a473d0d

Please sign in to comment.